Home: fix could not jump to sign in page

This commit is contained in:
thislight 2024-09-27 18:06:44 +08:00
parent 6463da68ae
commit ad5caa4428

View file

@ -11,7 +11,7 @@ import {
Suspense, Suspense,
Match, Match,
Switch as JsSwitch, Switch as JsSwitch,
ErrorBoundary ErrorBoundary,
} from "solid-js"; } from "solid-js";
import { useDocumentTitle } from "../utils"; import { useDocumentTitle } from "../utils";
import { type mastodon } from "masto"; import { type mastodon } from "masto";
@ -126,9 +126,11 @@ const TimelinePanel: Component<{
}; };
return ( return (
<ErrorBoundary fallback={(err, reset) => { <ErrorBoundary
return <p>Oops: {String(err)}</p> fallback={(err, reset) => {
}}> return <p>Oops: {String(err)}</p>;
}}
>
<PullDownToRefresh <PullDownToRefresh
linkedElement={scrollLinked()} linkedElement={scrollLinked()}
loading={snapshot.loading} loading={snapshot.loading}
@ -404,40 +406,42 @@ const Home: ParentComponent = (props) => {
} }
> >
<TimeSourceProvider value={now}> <TimeSourceProvider value={now}>
<div class="panel-list" ref={panelList!}> <Show when={!!client()}>
<div class="tab-panel"> <div class="panel-list" ref={panelList!}>
<div> <div class="tab-panel">
<TimelinePanel <div>
client={client()} <TimelinePanel
name="home" client={client()}
prefetch={prefetching()} name="home"
openFullScreenToot={openFullScreenToot} prefetch={prefetching()}
/> openFullScreenToot={openFullScreenToot}
/>
</div>
</div> </div>
</div> <div class="tab-panel">
<div class="tab-panel"> <div>
<div> <TimelinePanel
<TimelinePanel client={client()}
client={client()} name="trends"
name="trends" prefetch={prefetching()}
prefetch={prefetching()} openFullScreenToot={openFullScreenToot}
openFullScreenToot={openFullScreenToot} fullRefetch={120}
fullRefetch={120} />
/> </div>
</div> </div>
</div> <div class="tab-panel">
<div class="tab-panel"> <div>
<div> <TimelinePanel
<TimelinePanel client={client()}
client={client()} name="public"
name="public" prefetch={prefetching()}
prefetch={prefetching()} openFullScreenToot={openFullScreenToot}
openFullScreenToot={openFullScreenToot} />
/> </div>
</div> </div>
<div></div>
</div> </div>
<div></div> </Show>
</div>
</TimeSourceProvider> </TimeSourceProvider>
<Suspense> <Suspense>
<HeroSourceProvider value={[heroSrc, setHeroSrc]}> <HeroSourceProvider value={[heroSrc, setHeroSrc]}>