This commit is contained in:
yohlo
2025-09-25 16:42:55 -05:00
parent b3ebf46afa
commit 92c4987372
8 changed files with 1615 additions and 17 deletions

View File

@@ -695,6 +695,7 @@ import type { getRouter } from './router.tsx'
import type { createStart } from '@tanstack/react-start'
declare module '@tanstack/react-start' {
interface Register {
ssr: true
router: Awaited<ReturnType<typeof getRouter>>
}
}

View File

@@ -8,8 +8,6 @@ export const Route = createFileRoute("/api/events/$")({
middleware: [superTokensRequestMiddleware],
handlers: {
GET: ({ request, context }) => {
logger.info("ServerEvents | New connection", context?.userAuthId);
const stream = new ReadableStream({
start(controller) {
const connectMessage = `data: ${JSON.stringify({ type: "connected" })}\n\n`;
@@ -41,14 +39,6 @@ export const Route = createFileRoute("/api/events/$")({
const cleanup = () => {
serverEvents.off("test", handleEvent);
clearInterval(pingInterval);
try {
logger.info(
"ServerEvents | Closing connection",
context?.userAuthId
);
} catch (e) {
logger.error("ServerEvents | Error closing controller", e);
}
};
request.signal?.addEventListener("abort", cleanup);

View File

@@ -11,7 +11,7 @@ const Header = ({ tournament }: HeaderProps) => {
return (
<>
<Flex h="20dvh" px='xl' w='100%' align='self-end' gap='md'>
<Avatar name={tournament.name} radius={0} withBorder={false} size={125} src={`/api/files/tournaments/${tournament.id}/${tournament.logo}`} />
<Avatar name={tournament.name} radius={0} withBorder={false} size={150} src={`/api/files/tournaments/${tournament.id}/${tournament.logo}`} />
<Flex align='center' justify='center' gap={4} pb={20} w='100%'>
<Title ta='center' order={2}>{tournament.name}</Title>
</Flex>

View File

@@ -12,11 +12,6 @@ class PocketBaseAdminClient {
public authPromise: Promise<void>;
constructor() {
console.log('Environment variables loaded:', {
POCKETBASE_URL: process.env.POCKETBASE_URL,
POCKETBASE_ADMIN_EMAIL: process.env.POCKETBASE_ADMIN_EMAIL,
POCKETBASE_ADMIN_PASSWORD: process.env.POCKETBASE_ADMIN_PASSWORD,
});
this.pb = new PocketBase(process.env.POCKETBASE_URL);
this.pb.beforeSend = (url, options) => {

View File

@@ -14,6 +14,7 @@ const setupFetchInterceptor = () => {
if (typeof window === 'undefined') return;
const originalFetch = window.fetch;
//@ts-ignore
window.fetch = async (resource: RequestInfo | URL, options?: RequestInit) => {
const url = typeof resource === 'string' ? resource :
resource instanceof URL ? resource.toString() : resource.url;