refactor(auth): remove personal code from sign-up flow and update related components
feat(i18n): update translations for company account creation and get started
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
|
||||
import { useSupabase } from './use-supabase';
|
||||
import { medusaLoginOrRegister } from '../../../features/medusa-storefront/src/lib/data/customer';
|
||||
import { useSupabase } from './use-supabase';
|
||||
|
||||
interface Credentials {
|
||||
personalCode: string;
|
||||
email: string;
|
||||
password: string;
|
||||
emailRedirectTo: string;
|
||||
@@ -16,17 +15,14 @@ export function useSignUpWithEmailAndPassword() {
|
||||
const mutationKey = ['auth', 'sign-up-with-email-password'];
|
||||
|
||||
const mutationFn = async (params: Credentials) => {
|
||||
const { emailRedirectTo, captchaToken, personalCode, ...credentials } = params;
|
||||
|
||||
const { emailRedirectTo, captchaToken, ...credentials } = params;
|
||||
|
||||
// TODO?: should be a validation of unique personal code before registration
|
||||
const response = await client.auth.signUp({
|
||||
...credentials,
|
||||
options: {
|
||||
emailRedirectTo,
|
||||
captchaToken,
|
||||
data: {
|
||||
personalCode
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user