File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { useTranslation } from "@prefabs.tech/react-i18n" ;
22import { Message } from "@prefabs.tech/react-ui" ;
33import React , { useState } from "react" ;
4+ import { toast } from "react-toastify" ;
45
56import { DEFAULT_PATHS } from "@/constants" ;
67import { signup } from "@/supertokens" ;
@@ -83,6 +84,7 @@ export const SignupWrapper: React.FC<IProperties> = ({
8384 await setUser ( result . user ) ;
8485
8586 onSignupSuccess && ( await onSignupSuccess ( result ) ) ;
87+ toast . success ( `${ t ( "signup.messages.success" ) } ` ) ;
8688 }
8789 } )
8890 . catch ( async ( error ) => {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { useTranslation } from "@prefabs.tech/react-i18n";
22import { AuthPage , Message } from "@prefabs.tech/react-ui" ;
33import { useEffect , useState } from "react" ;
44import { useNavigate } from "react-router-dom" ;
5+ import { toast } from "react-toastify" ;
56
67import { getIsFirstUser , signUpFirstUser } from "@/api/user" ;
78import { DEFAULT_PATHS } from "@/constants" ;
@@ -51,13 +52,15 @@ export const SignUpFirstUser = ({
5152 . then ( ( ) => {
5253 setSignUpFirstUserLoading ( false ) ;
5354 setLoginLoading ( true ) ;
55+ toast . success ( `${ t ( "firstUser.signup.messages.success" ) } ` ) ;
5456
5557 // TODO Sign up first-user should return authenticated user from api
5658 login ( credentials )
5759 // eslint-disable-next-line @typescript-eslint/no-explicit-any
5860 . then ( ( result : any ) => {
5961 if ( result ?. user ) {
6062 setUser ( result . user ) ;
63+ toast . success ( `${ t ( "login.messages.success" ) } ` ) ;
6164 }
6265 } )
6366 . catch ( ( ) => {
You can’t perform that action at this time.
0 commit comments