mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 11:15:14 +00:00
give each app its own page, preloading and session stores, using context
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import { getSession } from '@sapper/app';
|
||||
const session = getSession();
|
||||
import { stores } from '@sapper/app';
|
||||
const { session } = stores();
|
||||
|
||||
export let title;
|
||||
</script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import { getSession } from '@sapper/app';
|
||||
const session = getSession();
|
||||
import { stores } from '@sapper/app';
|
||||
const { session } = stores();
|
||||
</script>
|
||||
|
||||
<h1>{$session.title}</h1>
|
||||
|
||||
Reference in New Issue
Block a user