Remove use-toast.tsx, refactor auth methods, and update UI components

This commit removes the redundant `use-toast.tsx` file and refactors the authentication methods in `personal-accounts-server-actions.ts` to enhance service integration and data handling. UI components like `LanguageDropdownSwitcher` and `site-header-account-section.tsx` have been refined for better readability. Changes in the `config.tsx` file aim to improve the overall code cleanliness. The `schema.sql` file under migrations was updated to cascade delete for 'invited_by' reference.
This commit is contained in:
giancarlo
2024-03-27 01:37:34 +08:00
parent 8a614bd6fc
commit 6699399864
10 changed files with 28 additions and 208 deletions

View File

@@ -13,5 +13,10 @@ import { Database } from '@kit/supabase/database';
export class PersonalAccountsService {
constructor(private readonly client: SupabaseClient<Database>) {}
async deletePersonalAccount(param: { userId: string }) {}
async deletePersonalAccount(
adminClient: SupabaseClient<Database>,
params: { userId: string },
) {
return adminClient.auth.admin.deleteUser(params.userId);
}
}