style: run prettier format on 9 files
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
|
||||
if (!authStore.isAuthenticated) {
|
||||
pageState = 'unauthorized';
|
||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||
goto('/login', { replaceState: true });
|
||||
return;
|
||||
}
|
||||
@@ -734,7 +734,7 @@
|
||||
// Phone validation (UK format)
|
||||
function validatePhone(phone: string): boolean {
|
||||
return isValidUKPhone(phone);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
}
|
||||
|
||||
function formatPhoneInput(value: string): string {
|
||||
@@ -1237,7 +1237,7 @@
|
||||
|
||||
if (response.ok) {
|
||||
toast.success('Account deleted successfully', { id: loadingToast });
|
||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||
authStore.logout();
|
||||
goto('/');
|
||||
} else {
|
||||
@@ -2599,7 +2599,7 @@
|
||||
<div>
|
||||
<h3 class="mb-2 text-sm font-semibold">Data Privacy</h3>
|
||||
<p class="mb-3 text-sm text-gray-600">
|
||||
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
||||
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
|
||||
View and export all personal data we hold about you
|
||||
</p>
|
||||
<Button onclick={() => goto('/gdpr')} variant="outline">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as Card from '$lib/components/ui/card';
|
||||
import { Skeleton } from '$lib/components/ui/skeleton';
|
||||
import { Separator } from '$lib/components/ui/separator';
|
||||
import { SvelteMap } from 'svelte/reactivity';
|
||||
import { SvelteMap } from 'svelte/reactivity';
|
||||
|
||||
type GdprData = {
|
||||
user_profile: {
|
||||
@@ -208,7 +208,7 @@ import { SvelteMap } from 'svelte/reactivity';
|
||||
}
|
||||
if (!authStore.isAuthenticated) {
|
||||
pageState = 'unauthorized';
|
||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||
goto('/login', { replaceState: true });
|
||||
return;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ import { SvelteMap } from 'svelte/reactivity';
|
||||
errorMessage = `Failed to fetch data (${res.status}): ${text}`;
|
||||
pageState = 'error';
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
} catch (e) {
|
||||
errorMessage = 'Network error — could not connect to server.';
|
||||
pageState = 'error';
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
payments?: Payment[];
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
let pageState = $state<'loading' | 'authorized' | 'unauthorized' | 'admin'>('loading');
|
||||
let loading = $state(true);
|
||||
let error = $state<string | null>(null);
|
||||
@@ -171,14 +171,14 @@
|
||||
|
||||
if (!authStore.isAuthenticated) {
|
||||
pageState = 'unauthorized';
|
||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||
goto('/login', { replaceState: true });
|
||||
return;
|
||||
}
|
||||
|
||||
if (authStore.currentUser?.role === 'admin') {
|
||||
pageState = 'admin';
|
||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
||||
goto('/admin', { replaceState: true });
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user