mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 19:45:26 +00:00
give each app its own page, preloading and session stores, using context
This commit is contained in:
@@ -271,14 +271,14 @@ function generate_app(manifest_data: ManifestData, path_to_routes: string) {
|
||||
import Layout from '${get_file(path_to_routes, manifest_data.root)}';
|
||||
import Error from '${get_file(path_to_routes, manifest_data.error)}';
|
||||
|
||||
export let session;
|
||||
export let stores;
|
||||
export let error;
|
||||
export let status;
|
||||
export let segments;
|
||||
export let level0;
|
||||
${levels.map(l => `export let level${l} = null;`).join('\n\t\t\t')}
|
||||
|
||||
setContext(CONTEXT_KEY, session);
|
||||
setContext(CONTEXT_KEY, stores);
|
||||
</script>
|
||||
|
||||
<Layout segment={segments[0]} {...level0.props}>
|
||||
|
||||
Reference in New Issue
Block a user