Skip to content

Commit

Permalink
🐛 FIxed timestamp on errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nwrenger committed Dec 28, 2024
1 parent f50fa03 commit a8828e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/+error.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
import * as Alert from '$lib/components/ui/alert';
import { page } from '$app/stores';
import { CircleAlert } from 'lucide-svelte';
const timestamp = new Date().toLocaleString();
</script>

<Alert.Root>
<CircleAlert class="h-4 w-4" />
<Alert.Title>Error: {$page.status} - {$page.error?.message || 'Unknown Error'}</Alert.Title>
<Alert.Description>
<p>URL: <code>{$page.url}</code></p>
<p>Timestamp: {new Date().toLocaleString()}</p>
<p>Timestamp: {timestamp}</p>
</Alert.Description>
</Alert.Root>

0 comments on commit a8828e2

Please sign in to comment.