Skip to content

Commit 028ba7c

Browse files
committed
Make code more dry
1 parent 6ceada0 commit 028ba7c

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

src/routes/(console)/supportWizard.svelte

+7-15
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,13 @@
116116
<Typography.Text color="--fgcolor-neutral-secondary"
117117
>Choose a topic</Typography.Text>
118118
<Layout.Stack gap="s" direction="row">
119-
<Tag
120-
on:click={() => {
121-
$supportData.category = 'general';
122-
}}
123-
selected={$supportData.category === 'general'}>general</Tag>
124-
<Tag
125-
on:click={() => {
126-
$supportData.category = 'billing';
127-
}}
128-
selected={$supportData.category === 'billing'}>billing</Tag>
129-
<Tag
130-
on:click={() => {
131-
$supportData.category = 'technical';
132-
}}
133-
selected={$supportData.category === 'technical'}>technical</Tag>
119+
{#each ['general', 'billing', 'technical'] as category}
120+
<Tag
121+
on:click={() => {
122+
$supportData.category = category;
123+
}}
124+
selected={$supportData.category === category}>{category}</Tag>
125+
{/each}
134126
</Layout.Stack>
135127
</Layout.Stack>
136128
<InputSelect

0 commit comments

Comments
 (0)