aki-008 commited on
Commit
fcb1d4c
·
1 Parent(s): f5b5f99

chore: fixed signup page

Browse files
Frontend/src/components/auth/SignUp.tsx CHANGED
@@ -37,12 +37,10 @@ const SignUp: React.FC<SignUpProps> = ({ onSwitchToSignIn, onAuthSuccess }) => {
37
  email,
38
  password,
39
  });
40
-
41
  // Extract token and username
42
  const { access_token, username: loggedInUser } = loginResponse.data;
43
-
44
  // 3. Pass both to the parent handler
45
- [cite_start]; // This ensures the AuthContext gets the token to persist the session [cite: 334, 335, 336]
46
  onAuthSuccess(loggedInUser, access_token);
47
  } catch (err: any) {
48
  console.error("Registration/Login error:", err);
 
37
  email,
38
  password,
39
  });
 
40
  // Extract token and username
41
  const { access_token, username: loggedInUser } = loginResponse.data;
 
42
  // 3. Pass both to the parent handler
43
+ // This ensures the AuthContext gets the token to persist the session
44
  onAuthSuccess(loggedInUser, access_token);
45
  } catch (err: any) {
46
  console.error("Registration/Login error:", err);