Tanstack router nonsense. build no error but error. WTF?

This commit is contained in:
Aslam H
2024-10-20 08:26:50 +07:00
parent 886ac844fb
commit 45d86cbb1a
2 changed files with 16 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ const LayoutPagesRoute = LayoutPagesImport.update({
} as any) } as any)
const LayoutlandingIndexRoute = LayoutlandingIndexImport.update({ const LayoutlandingIndexRoute = LayoutlandingIndexImport.update({
id: '/(landing)/',
path: '/', path: '/',
getParentRoute: () => LayoutRoute, getParentRoute: () => LayoutRoute,
} as any) } as any)
@@ -70,82 +71,96 @@ const LayoutauthAuthRoute = LayoutauthAuthImport.update({
} as any) } as any)
const LayoutPagestopicSplatRoute = LayoutPagestopicSplatImport.update({ const LayoutPagestopicSplatRoute = LayoutPagestopicSplatImport.update({
id: '/(topic)/$',
path: '/$', path: '/$',
getParentRoute: () => LayoutPagesRoute, getParentRoute: () => LayoutPagesRoute,
} as any) } as any)
const LayoutPagesProtectedTopicsIndexRoute = const LayoutPagesProtectedTopicsIndexRoute =
LayoutPagesProtectedTopicsIndexImport.update({ LayoutPagesProtectedTopicsIndexImport.update({
id: '/topics/',
path: '/topics/', path: '/topics/',
getParentRoute: () => LayoutPagesProtectedRoute, getParentRoute: () => LayoutPagesProtectedRoute,
} as any) } as any)
const LayoutPagesProtectedTasksIndexRoute = const LayoutPagesProtectedTasksIndexRoute =
LayoutPagesProtectedTasksIndexImport.update({ LayoutPagesProtectedTasksIndexImport.update({
id: '/tasks/',
path: '/tasks/', path: '/tasks/',
getParentRoute: () => LayoutPagesProtectedRoute, getParentRoute: () => LayoutPagesProtectedRoute,
} as any) } as any)
const LayoutPagesProtectedSettingsIndexRoute = const LayoutPagesProtectedSettingsIndexRoute =
LayoutPagesProtectedSettingsIndexImport.update({ LayoutPagesProtectedSettingsIndexImport.update({
id: '/settings/',
path: '/settings/', path: '/settings/',
getParentRoute: () => LayoutPagesProtectedRoute, getParentRoute: () => LayoutPagesProtectedRoute,
} as any) } as any)
const LayoutPagesProtectedSearchIndexRoute = const LayoutPagesProtectedSearchIndexRoute =
LayoutPagesProtectedSearchIndexImport.update({ LayoutPagesProtectedSearchIndexImport.update({
id: '/search/',
path: '/search/', path: '/search/',
getParentRoute: () => LayoutPagesProtectedRoute, getParentRoute: () => LayoutPagesProtectedRoute,
} as any) } as any)
const LayoutPagesProtectedProfileIndexRoute = const LayoutPagesProtectedProfileIndexRoute =
LayoutPagesProtectedProfileIndexImport.update({ LayoutPagesProtectedProfileIndexImport.update({
id: '/profile/',
path: '/profile/', path: '/profile/',
getParentRoute: () => LayoutPagesProtectedRoute, getParentRoute: () => LayoutPagesProtectedRoute,
} as any) } as any)
const LayoutPagesProtectedPagesIndexRoute = const LayoutPagesProtectedPagesIndexRoute =
LayoutPagesProtectedPagesIndexImport.update({ LayoutPagesProtectedPagesIndexImport.update({
id: '/pages/',
path: '/pages/', path: '/pages/',
getParentRoute: () => LayoutPagesProtectedRoute, getParentRoute: () => LayoutPagesProtectedRoute,
} as any) } as any)
const LayoutPagesProtectedOnboardingIndexRoute = const LayoutPagesProtectedOnboardingIndexRoute =
LayoutPagesProtectedOnboardingIndexImport.update({ LayoutPagesProtectedOnboardingIndexImport.update({
id: '/onboarding/',
path: '/onboarding/', path: '/onboarding/',
getParentRoute: () => LayoutPagesProtectedRoute, getParentRoute: () => LayoutPagesProtectedRoute,
} as any) } as any)
const LayoutPagesProtectedLinksIndexRoute = const LayoutPagesProtectedLinksIndexRoute =
LayoutPagesProtectedLinksIndexImport.update({ LayoutPagesProtectedLinksIndexImport.update({
id: '/links/',
path: '/links/', path: '/links/',
getParentRoute: () => LayoutPagesProtectedRoute, getParentRoute: () => LayoutPagesProtectedRoute,
} as any) } as any)
const LayoutPagesProtectedJournalsIndexRoute = const LayoutPagesProtectedJournalsIndexRoute =
LayoutPagesProtectedJournalsIndexImport.update({ LayoutPagesProtectedJournalsIndexImport.update({
id: '/journals/',
path: '/journals/', path: '/journals/',
getParentRoute: () => LayoutPagesProtectedRoute, getParentRoute: () => LayoutPagesProtectedRoute,
} as any) } as any)
const LayoutauthAuthSignUpSplatRoute = LayoutauthAuthSignUpSplatImport.update({ const LayoutauthAuthSignUpSplatRoute = LayoutauthAuthSignUpSplatImport.update({
id: '/sign-up/$',
path: '/sign-up/$', path: '/sign-up/$',
getParentRoute: () => LayoutauthAuthRoute, getParentRoute: () => LayoutauthAuthRoute,
} as any) } as any)
const LayoutauthAuthSignInSplatRoute = LayoutauthAuthSignInSplatImport.update({ const LayoutauthAuthSignInSplatRoute = LayoutauthAuthSignInSplatImport.update({
id: '/sign-in/$',
path: '/sign-in/$', path: '/sign-in/$',
getParentRoute: () => LayoutauthAuthRoute, getParentRoute: () => LayoutauthAuthRoute,
} as any) } as any)
const LayoutPagesProtectedPagesPageIdIndexRoute = const LayoutPagesProtectedPagesPageIdIndexRoute =
LayoutPagesProtectedPagesPageIdIndexImport.update({ LayoutPagesProtectedPagesPageIdIndexImport.update({
id: '/pages/$pageId/',
path: '/pages/$pageId/', path: '/pages/$pageId/',
getParentRoute: () => LayoutPagesProtectedRoute, getParentRoute: () => LayoutPagesProtectedRoute,
} as any) } as any)
const LayoutPagesProtectedCommunityTopicNameIndexRoute = const LayoutPagesProtectedCommunityTopicNameIndexRoute =
LayoutPagesProtectedCommunityTopicNameIndexImport.update({ LayoutPagesProtectedCommunityTopicNameIndexImport.update({
id: '/community/$topicName/',
path: '/community/$topicName/', path: '/community/$topicName/',
getParentRoute: () => LayoutPagesProtectedRoute, getParentRoute: () => LayoutPagesProtectedRoute,
} as any) } as any)

View File

@@ -16,7 +16,7 @@ export const Route = createFileRoute("/_layout/_pages/(topic)/$")({
export const openPopoverForIdAtom = atom<string | null>(null) export const openPopoverForIdAtom = atom<string | null>(null)
export function TopicDetailComponent() { export function TopicDetailComponent() {
const params = useParams({ from: "/_layout/_pages/$" }) const params = useParams({ from: "/_layout/_pages/(topic)/$" })
const { me } = useAccountOrGuest({ root: { personalLinks: [] } }) const { me } = useAccountOrGuest({ root: { personalLinks: [] } })
const topicID = React.useMemo( const topicID = React.useMemo(