mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-09 10:18:57 +00:00
fix scroll when no session exists
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user