diff options
Diffstat (limited to 'src/lib/components')
| -rw-r--r-- | src/lib/components/insult.svelte | 15 | ||||
| -rw-r--r-- | src/lib/components/new_insult.svelte | 18 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/lib/components/insult.svelte b/src/lib/components/insult.svelte new file mode 100644 index 0000000..61c17ec --- /dev/null +++ b/src/lib/components/insult.svelte @@ -0,0 +1,15 @@ +<script> + export let insult +</script> + +<article> + <header> + Eres un/a + </header> + <main> + {insult} + </main> + <footer> + <a href="/">Insulto nuevo.</a> + </footer> +</article> diff --git a/src/lib/components/new_insult.svelte b/src/lib/components/new_insult.svelte new file mode 100644 index 0000000..525741a --- /dev/null +++ b/src/lib/components/new_insult.svelte @@ -0,0 +1,18 @@ +<script> + import { getInsult } from '$lib/stores/insults'; + import { goto } from '$app/navigation'; + + $: insult = getInsult(); + + $: { + if ($insult) { + goto(`/${$insult}`); + } + } +</script> + +<article> + <main> + Insultando... + </main> +</article> |