aboutsummaryrefslogtreecommitdiff
path: root/src/components/tag
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2021-04-15 23:06:26 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2021-04-15 23:06:26 +0200
commit58f7d52150456713d3132408668a92d0f6f3d084 (patch)
tree4b346042a684e416e53c4f4ac779060b832ad227 /src/components/tag
parent63c3da2af27fcfb1a9893ade03543e3a30949c8d (diff)
Port to sveltekit
Diffstat (limited to 'src/components/tag')
-rw-r--r--src/components/tag/tag.svelte32
1 files changed, 9 insertions, 23 deletions
diff --git a/src/components/tag/tag.svelte b/src/components/tag/tag.svelte
index a14cd19..954cdaa 100644
--- a/src/components/tag/tag.svelte
+++ b/src/components/tag/tag.svelte
@@ -1,27 +1,13 @@
<script>
- export let id;
+ export let tag;
- import { _ } from 'svelte-i18n';
- import { getTag } from '$/stores/tag';
- import ErrorBlock from '$/components/error_block/error_block.svelte';
- import Loader from '$/components/loader/loader.svelte';
- import TopicSummary from '$/components/topic_summary/topic_summary.svelte';
-
- $: store = getTag(id);
- $: tag = $store.data;
+ import { _ } from 'svelte-i18n';
+ import TopicSummary from '$/components/topic_summary/topic_summary.svelte';
</script>
-{#if $store.loading}
- <Loader />
-{/if}
-{#if $store.error}
- <ErrorBlock message={$_('tag.error.unavailable')} />
-{/if}
-{#if tag}
- <h1>{$_('tag.title')} {tag.id}</h1>
- <ul>
- {#each tag.topics as topic}
- <TopicSummary topic={topic} />
- {/each}
- </ul>
-{/if}
+<h1>{$_('tag.title')}: {tag.id}</h1>
+<ul>
+ {#each tag.topics as topic}
+ <TopicSummary {topic} />
+ {/each}
+</ul>