Skip to content

Commit e84d3c6

Browse files
committed
refactor: simplify ErrorMessage component by removing collapsible prop and adjusting button visibility
1 parent 7fd6656 commit e84d3c6

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/lib/components/errors/ErrorMessage.svelte

+5-9
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020
teamSlug,
2121
workloadName,
2222
environment,
23-
docURL,
24-
collapsible = true
23+
docURL
2524
}: {
26-
collapsible?: boolean;
2725
workloadType: 'App' | 'Job';
2826
teamSlug: string;
2927
workloadName: string;
@@ -93,13 +91,11 @@
9391
<div class="content">
9492
<div style="display: flex; align-items: center; gap: var(--a-spacing-2);">
9593
<Heading level="2" size="small">{heading[error.__typename]}</Heading>
96-
{#if collapsible}
97-
<Button variant="tertiary" size="xsmall" onclick={() => (open = !open)}>
98-
{open ? 'Hide' : 'Show'} details
99-
</Button>
100-
{/if}
94+
<Button variant="tertiary" size="xsmall" onclick={() => (open = !open)}>
95+
{open ? 'Hide' : 'Show'} details
96+
</Button>
10197
</div>
102-
{#if open || !collapsible}
98+
{#if open}
10399
{#if error.__typename === 'WorkloadStatusInvalidNaisYaml'}
104100
<BodyLong>
105101
The rollout of your {workloadType === 'Job' ? 'job' : 'application'} has failed due to an

0 commit comments

Comments
 (0)