Skip to content

Commit

Permalink
fix: remove view transition
Browse files Browse the repository at this point in the history
  • Loading branch information
cabreraalex committed Dec 29, 2023
1 parent 74c900f commit cd6e38c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
10 changes: 1 addition & 9 deletions frontend/src/routes/(app)/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<script lang="ts">
import { navigating } from '$app/stores';
import { getEndpoint } from '$lib/api/util.js';
import Spinner from '$lib/components/general/Spinner.svelte';
import { ZenoClient } from '$lib/zenoapi';
import * as amplitude from '@amplitude/analytics-browser';
import { setContext } from 'svelte';
Expand All @@ -28,11 +26,5 @@
</script>

<main class="h-full w-full text-left md:flex">
{#if Boolean($navigating)}
<div class="flex h-full w-full items-center justify-center">
<Spinner />
</div>
{:else}
<slot />
{/if}
<slot />
</main>
14 changes: 7 additions & 7 deletions frontend/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
text: undefined
});
if (!document.startViewTransition) return;
// if (!document.startViewTransition) return;
return new Promise((resolve) => {
document.startViewTransition(async () => {
resolve();
await navigation.complete;
});
});
// return new Promise((resolve) => {
// document.startViewTransition(async () => {
// resolve();
// await navigation.complete;
// });
// });
});
</script>

Expand Down

0 comments on commit cd6e38c

Please sign in to comment.