Better error norifications

This commit is contained in:
Roman Krček
2025-07-14 14:30:55 +02:00
parent a8f1b973e6
commit 06f2553b42
14 changed files with 513 additions and 68 deletions

View File

@@ -2,7 +2,7 @@
import type { GoogleSheet } from '$lib/google/sheets/types.ts';
// Props
let { sheetsData = $bindable(), errors = $bindable(), loadRecentSheets, selectSheet, toggleSheetList } = $props<{
let { sheetsData = $bindable(), loadRecentSheets, selectSheet, toggleSheetList } = $props<{
sheetsData: {
availableSheets: GoogleSheet[];
selectedSheet: GoogleSheet | null;
@@ -16,7 +16,6 @@
loading: boolean;
expandedSheetList: boolean;
};
errors: Record<string, string>;
loadRecentSheets: () => Promise<void>;
selectSheet: (sheet: GoogleSheet) => Promise<void>;
toggleSheetList: () => void;
@@ -257,9 +256,7 @@
</div>
{/if}
{#if errors.sheet}
<p class="mt-2 text-sm text-red-600">{errors.sheet}</p>
{/if}
<!-- Error messages are now shown as toast notifications -->
</div>
{#if sheetsData.selectedSheet && sheetsData.sheetData.length > 0}
@@ -374,9 +371,7 @@
</div>
{/if}
{#if errors.sheetData}
<p class="text-sm text-red-600">{errors.sheetData}</p>
{/if}
<!-- Error messages are now shown as toast notifications -->
</div>