Skip to content

Commit

Permalink
Added link to login page on signup page
Browse files Browse the repository at this point in the history
  • Loading branch information
radu-constantin committed Feb 6, 2024
1 parent f6ea3ee commit 1430e19
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/frontend/src/components/SignUpForm/SignUpForm.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { Form, Col } from 'react-bootstrap';
import { Form as FormRouter } from 'react-router-dom';
import { Form as FormRouter, useNavigate } from 'react-router-dom';
import CustomBtn from '../CustomBtn/CustomBtn';
import styles from './SignUpForm.module.css';

export default function SignUpForm({ className }: { className: string }) {
const navigate = useNavigate();
const redirectToLogin = () => navigate('/login');

return (
<Col lg={6} className={className}>
<FormRouter method="post" role="form" className={styles.signUpForm}>
Expand Down Expand Up @@ -43,6 +46,9 @@ export default function SignUpForm({ className }: { className: string }) {
<CustomBtn variant="primary" type="submit">
Submit
</CustomBtn>
<CustomBtn variant="outline-dark" onClick={redirectToLogin}>
Already have an account? Log in!
</CustomBtn>
</div>
</FormRouter>
</Col>
Expand Down

0 comments on commit 1430e19

Please sign in to comment.