File tree Expand file tree Collapse file tree 2 files changed +16
-12
lines changed
sites/svelte.dev/src/routes Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 44 import { Icon , Shell } from ' @sveltejs/site-kit/components' ;
55 import { Nav , Separator } from ' @sveltejs/site-kit/nav' ;
66 import { Search , SearchBox } from ' @sveltejs/site-kit/search' ;
7- import { onNavigate } from ' $app/navigation' ;
87 import ' @sveltejs/site-kit/styles/index.css' ;
98
109 export let data;
11-
12- onNavigate ((navigation ) => {
13- if (! document .startViewTransition ) return ;
14-
15- return new Promise ((resolve ) => {
16- document .startViewTransition (async () => {
17- resolve ();
18- await navigation .complete ;
19- });
20- });
21- });
2210 </script >
2311
2412<svelte:head >
Original file line number Diff line number Diff line change 1+ <script >
2+ import { onNavigate } from ' $app/navigation' ;
3+
4+ onNavigate ((navigation ) => {
5+ if (! document .startViewTransition ) return ;
6+
7+ return new Promise ((resolve ) => {
8+ document .startViewTransition (async () => {
9+ resolve ();
10+ await navigation .complete ;
11+ });
12+ });
13+ });
14+ </script >
15+
16+ <slot />
You can’t perform that action at this time.
0 commit comments