Skip to content

Commit 3e308b2

Browse files
committed
Fixed transitions between when page content is replaced during routing, previously you could see the page contents on the screen.
1 parent 99b6737 commit 3e308b2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Exceptionless.Web/ClientApp/src/routes/(app)/+layout.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import { validate } from '$shared/validation';
1111
import { setModelValidator, useMiddleware } from '@exceptionless/fetchclient';
1212
import { useQueryClient } from '@tanstack/svelte-query';
13+
import { fade } from 'svelte/transition';
1314
1415
import { type NavigationItemContext, routes } from '../routes';
1516
import FooterLayout from './(components)/layouts/Footer.svelte';
@@ -130,7 +131,11 @@
130131
<div class="w-full text-secondary-foreground">
131132
<main class="px-4 pt-4">
132133
<NavigationCommand bind:open={isCommandOpen} routes={filteredRoutes} />
133-
{@render children()}
134+
{#key $page.url.pathname}
135+
<div in:fade={{ delay: 150, duration: 150 }} out:fade={{ duration: 150 }}>
136+
{@render children()}
137+
</div>
138+
{/key}
134139
</main>
135140

136141
<FooterLayout></FooterLayout>

0 commit comments

Comments
 (0)