fix(web): don't redraw router when logging in

This commit is contained in:
əlemi 2024-05-29 18:04:47 +02:00
parent 91316c99af
commit 4bb0b6b4da
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -111,8 +111,6 @@ pub fn App() -> impl IntoView {
// in a sense it's what we want: refreshing the home tl is main purpose, but also // in a sense it's what we want: refreshing the home tl is main purpose, but also
// server tl may contain stuff we can no longer see, or otherwise we may now be // server tl may contain stuff we can no longer see, or otherwise we may now be
// entitled to see new posts. so while being ugly it's techically correct ig? // entitled to see new posts. so while being ugly it's techically correct ig?
{move || {
view! {
<main> <main>
<Routes> <Routes>
<Route path="/web" view=move || <Route path="/web" view=move ||
@ -125,7 +123,7 @@ pub fn App() -> impl IntoView {
<Route path="/web/home" view=move || view! { <TimelinePage name="home" tl=home_tl /> } /> <Route path="/web/home" view=move || view! { <TimelinePage name="home" tl=home_tl /> } />
<Route path="/web/server" view=move || view! { <TimelinePage name="server" tl=server_tl /> } /> <Route path="/web/server" view=move || view! { <TimelinePage name="server" tl=server_tl /> } />
<Route path="/web/local" view=move || view! { <TimelinePage name="server" tl=local_tl /> } /> <Route path="/web/local" view=move || view! { <TimelinePage name="local" tl=local_tl /> } />
<Route path="/web/about" view=AboutPage /> <Route path="/web/about" view=AboutPage />
<Route path="/web/config" view=move || view! { <ConfigPage setter=set_config /> } /> <Route path="/web/config" view=move || view! { <ConfigPage setter=set_config /> } />
@ -140,8 +138,6 @@ pub fn App() -> impl IntoView {
<Route path="/" view=move || view! { <Redirect path="/web" /> } /> <Route path="/" view=move || view! { <Redirect path="/web" /> } />
</Routes> </Routes>
</main> </main>
}
}}
</Router> </Router>
</div> </div>
</div> </div>