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 4
4
import { Icon , Shell } from ' @sveltejs/site-kit/components' ;
5
5
import { Nav , Separator } from ' @sveltejs/site-kit/nav' ;
6
6
import { Search , SearchBox } from ' @sveltejs/site-kit/search' ;
7
- import { onNavigate } from ' $app/navigation' ;
8
7
import ' @sveltejs/site-kit/styles/index.css' ;
9
8
10
9
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
- });
22
10
</script >
23
11
24
12
<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