Show clear home button if repo fails to load

This commit is contained in:
Mattias Granlund 2023-12-02 14:06:34 +01:00
parent cfc0cd1c49
commit 703472368a

View File

@ -2,7 +2,6 @@
import type { LayoutData } from './$types';
import { onMount } from 'svelte';
import { Code } from '$lib/backend/ipc';
import IconButton from '$lib/components/IconButton.svelte';
import { goto } from '$app/navigation';
import BaseBranchSelect from './BaseBranchSelect.svelte';
import { unsubscribe } from '$lib/utils/random';
@ -74,12 +73,14 @@
</div>
</div>
{:else}
<div class="flex max-w-xl gap-x-2 p-4">
<IconButton icon="home" on:click={() => goto('/')}></IconButton>
<div class="flex max-w-xl flex-col gap-y-3 p-4">
<div>
<h1 class="text-lg font-semibold">There was a problem loading this repo</h1>
<p>{$branchesError$.message}</p>
</div>
<div class="text-center">
<Button icon="home" on:click={() => goto('/')}>Home</Button>
</div>
</div>
{/if}
</div>