Skip to content

Commit

Permalink
Add empty state for Upcoming Runs on schedule detail page (#2354)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurakwhit authored Sep 27, 2024
1 parent 6292257 commit 4ac3e46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/components/schedule/schedule-upcoming-runs.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import Panel from '$lib/components/panel.svelte';
import EmptyState from '$lib/holocene/empty-state.svelte';
import { translate } from '$lib/i18n/translate';
import { relativeTime, timeFormat } from '$lib/stores/time-format';
import { formatDate } from '$lib/utilities/format-date';
Expand All @@ -9,7 +10,7 @@
export let futureRuns: Timestamp[] = [];
</script>

<Panel>
<Panel class="w-full">
<h2 class="mb-4">{translate('schedules.upcoming-runs')}</h2>
{#each futureRuns.slice(0, 5) as run}
<div class="row">
Expand All @@ -20,6 +21,10 @@
})}
</p>
</div>
{:else}
<EmptyState
title={translate('schedules.upcoming-runs-empty-state-title')}
/>
{/each}
</Panel>

Expand Down
1 change: 1 addition & 0 deletions src/lib/i18n/locales/en/schedules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const Strings = {
'recent-runs': 'Recent Runs',
'recent-runs-empty-state-title': 'No Recent Runs',
'upcoming-runs': 'Upcoming Runs',
'upcoming-runs-empty-state-title': 'No Upcoming Runs',
loading: 'Loading Schedule...',
deleting: 'Deleting Schedule...',
'delete-schedule-error': 'Cannot delete schedule. {{error}}',
Expand Down

0 comments on commit 4ac3e46

Please sign in to comment.