mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-22 07:05:24 +00:00
update some tests
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<h1>{post.title}</h1>
|
||||
<script context="module">
|
||||
export function preload({ params }) {
|
||||
return this.fetch(`blog/${params.slug}.json`).then(r => r.json()).then(post => {
|
||||
return { post };
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
preload({ params }) {
|
||||
return this.fetch(`blog/${params.slug}.json`).then(r => r.json()).then(post => {
|
||||
return { post };
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
export let post;
|
||||
</script>
|
||||
|
||||
<h1>{post.title}</h1>
|
||||
Reference in New Issue
Block a user