fix scroll when no session exists

This commit is contained in:
Dax Raad
2025-11-07 13:22:03 -05:00
parent c6eea0343d
commit 4463d319c9
2 changed files with 16 additions and 8 deletions

View File

@@ -107,14 +107,18 @@ export function Session() {
const contentWidth = createMemo(() => dimensions().width - (sidebarVisible() ? 42 : 0) - 4)
createEffect(async () => {
await sync.session.sync(route.sessionID).catch(() => {
toast.show({
message: `Session not found: ${route.sessionID}`,
variant: "error",
await sync.session
.sync(route.sessionID)
.then(() => {
scroll.scrollBy(100_000)
})
.catch(() => {
toast.show({
message: `Session not found: ${route.sessionID}`,
variant: "error",
})
return navigate({ type: "home" })
})
return navigate({ type: "home" })
})
scroll.scrollBy(100_000)
})
const toast = useToast()