This repository was archived by the owner on Dec 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
packages/fastify-dx-svelte/virtual Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 22import { proxy } from ' sveltio'
33import { Router , Route } from ' svelte-routing'
44import DXRoute from ' /dx:route.svelte'
5+ import { isServer } from ' /dx:core.js'
56
67export let url = null
78export let payload
89
9- let state = proxy (payload .serverRoute .state )
10+ let state = isServer
11+ ? payload .serverRoute .state
12+ : proxy (payload .serverRoute .state )
1013 </script >
1114
1215<Router url =" {url }" >
1316 {#each payload .routes as { path, component }}
1417 <Route path =" {path }" let:location >
1518 <DXRoute
19+ path ={path }
1620 location ={location }
1721 state ={state }
1822 payload ={payload }
Original file line number Diff line number Diff line change @@ -3,22 +3,25 @@ import 'uno.css'
33import { proxy } from ' sveltio'
44import { Router , Route } from ' svelte-routing'
55import DXRoute from ' /dx:route.svelte'
6+ import { isServer } from ' /dx:core.js'
67
78export let url = null
89export let payload
910
10- let state = proxy (payload .serverRoute .state )
11+ let state = isServer
12+ ? payload .serverRoute .state
13+ : proxy (payload .serverRoute .state )
1114 </script >
1215
1316<Router url =" {url }" >
1417 {#each payload .routes as { path, component }}
1518 <Route path =" {path }" let:location >
16- <DXRoute
19+ <DXRoute
1720 path ={path }
18- location ={location }
19- state ={state }
21+ location ={location }
22+ state ={state }
2023 payload ={payload }
21- component ={component } />
24+ component ={component } />
2225 </Route >
2326 {/each }
2427</Router >
You can’t perform that action at this time.
0 commit comments