{children}
-
-
>
);
diff --git a/apps/start/src/routes/index.tsx b/apps/start/src/routes/index.tsx
index 4327dd5a..e040477f 100644
--- a/apps/start/src/routes/index.tsx
+++ b/apps/start/src/routes/index.tsx
@@ -1,3 +1,5 @@
+import { useSuspenseQuery } from '@tanstack/react-query';
+import { createFileRoute, Link, redirect } from '@tanstack/react-router';
import FullPageLoadingState from '@/components/full-page-loading-state';
import { LogoSquare } from '@/components/logo';
import { PageHeader } from '@/components/page-header';
@@ -6,11 +8,9 @@ import { useLogout } from '@/hooks/use-logout';
import { useNumber } from '@/hooks/use-numer-formatter';
import { useTRPC } from '@/integrations/trpc/react';
import { createTitle } from '@/utils/title';
-import { useQuery, useSuspenseQuery } from '@tanstack/react-query';
-import { Link, createFileRoute, redirect } from '@tanstack/react-router';
export const Route = createFileRoute('/')({
- beforeLoad: async ({ context }) => {
+ beforeLoad: ({ context }) => {
if (!context.session.session) {
throw redirect({ to: '/login' });
}
@@ -28,7 +28,7 @@ export const Route = createFileRoute('/')({
context.trpc.organization.list.queryOptions(undefined, {
staleTime: 0,
gcTime: 0,
- }),
+ })
)
.catch(() => []);
@@ -50,28 +50,28 @@ function LandingPage() {
const trpc = useTRPC();
const logout = useLogout();
const { data: organizations } = useSuspenseQuery(
- trpc.organization.list.queryOptions(),
+ trpc.organization.list.queryOptions()
);
const number = useNumber();
return (
-
-
+
+
{organizations?.map((org) => (
{org.name}
@@ -89,7 +89,7 @@ function LandingPage() {
-