mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 01:09:40 +02:00
style: auto-format codebase with Prettier
Applied formatting to 1487+ files using pnpm format:write - TypeScript/JavaScript files - Svelte components - Astro pages - JSON configs - Markdown docs 13 files still need manual review (Astro JSX comments)
This commit is contained in:
parent
0241f5554c
commit
d36b321d9d
3952 changed files with 661498 additions and 739751 deletions
|
|
@ -181,6 +181,6 @@ export function createAuthStore<TUser extends BaseUser>(authService: AuthService
|
|||
*/
|
||||
clearError() {
|
||||
error = null;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,12 +77,12 @@ export function createSupabaseAuthStore(
|
|||
async function getUserFromSession(): Promise<SupabaseUser | null> {
|
||||
const supabase = getSupabaseClient();
|
||||
const {
|
||||
data: { session }
|
||||
data: { session },
|
||||
} = await supabase.auth.getSession();
|
||||
if (!session?.user) return null;
|
||||
return {
|
||||
id: session.user.id,
|
||||
email: session.user.email || ''
|
||||
email: session.user.email || '',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ export function createSupabaseAuthStore(
|
|||
const supabase = getSupabaseClient();
|
||||
const { error: authError } = await supabase.auth.signInWithPassword({
|
||||
email,
|
||||
password
|
||||
password,
|
||||
});
|
||||
|
||||
if (authError) {
|
||||
|
|
@ -165,7 +165,7 @@ export function createSupabaseAuthStore(
|
|||
const supabase = getSupabaseClient();
|
||||
const { data, error: authError } = await supabase.auth.signUp({
|
||||
email,
|
||||
password
|
||||
password,
|
||||
});
|
||||
|
||||
if (authError) {
|
||||
|
|
@ -183,7 +183,7 @@ export function createSupabaseAuthStore(
|
|||
return {
|
||||
success: true,
|
||||
needsVerification,
|
||||
user: user || undefined
|
||||
user: user || undefined,
|
||||
};
|
||||
} catch (e) {
|
||||
const errorMessage = e instanceof Error ? e.message : 'Sign up failed';
|
||||
|
|
@ -206,7 +206,7 @@ export function createSupabaseAuthStore(
|
|||
options.passwordResetRedirectUrl || `${window.location.origin}/reset-password`;
|
||||
|
||||
const { error: authError } = await supabase.auth.resetPasswordForEmail(email, {
|
||||
redirectTo
|
||||
redirectTo,
|
||||
});
|
||||
|
||||
if (authError) {
|
||||
|
|
@ -266,6 +266,6 @@ export function createSupabaseAuthStore(
|
|||
*/
|
||||
clearError() {
|
||||
error = null;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,10 @@
|
|||
// Factory functions
|
||||
export { createAuthStore } from './createAuthStore.svelte';
|
||||
export { createSupabaseAuthStore } from './createSupabaseAuthStore.svelte';
|
||||
export type { CreateSupabaseAuthStoreOptions, SupabaseUser } from './createSupabaseAuthStore.svelte';
|
||||
export type {
|
||||
CreateSupabaseAuthStoreOptions,
|
||||
SupabaseUser,
|
||||
} from './createSupabaseAuthStore.svelte';
|
||||
|
||||
// Types
|
||||
export type {
|
||||
|
|
@ -38,5 +41,5 @@ export type {
|
|||
AuthServiceAdapter,
|
||||
AuthStoreState,
|
||||
AuthStoreActions,
|
||||
AuthStore
|
||||
AuthStore,
|
||||
} from './types';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue