Skip to content

Commit

Permalink
Allow user to login at anytime during registration
Browse files Browse the repository at this point in the history
  • Loading branch information
JiashuHarryHuang committed Feb 9, 2024
1 parent 374e5de commit 0d2fdc7
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/Register/RegisterPage1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
InputFlex,
InputText,
InputContainer,
LoginLink,
} from '@/styles/register.styles';
import { dateIsValid, formatBirthday, formatPhoneNumber } from '@/utils/utils';

Expand Down Expand Up @@ -181,6 +182,7 @@ const RegisterPage1 = ({
{errors.state && printError('State is required')}
{errors.zip && printError('Zip code is required')}
</SectionContainer>
<LoginLink href="/login">Already have an account? Login here</LoginLink>
</Form>

<RegisterFlow
Expand Down
2 changes: 2 additions & 0 deletions components/Register/RegisterPage2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
CheckboxContainer,
InputText,
Fieldset,
LoginLink,
} from '@/styles/register.styles';

/**
Expand Down Expand Up @@ -209,6 +210,7 @@ const RegisterPage2 = ({
</InputContainer>
{errors.volunteerReason && printError('A response is required')}
</SectionContainer>
<LoginLink href="/login">Already have an account? Login here</LoginLink>
</Form>

<RegisterFlow
Expand Down
2 changes: 2 additions & 0 deletions components/Register/RegisterPage3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
InputTextarea,
JoinNewsletterContainer,
Fieldset,
LoginLink,
} from '@/styles/register.styles';

const RegisterPage3 = ({
Expand Down Expand Up @@ -165,6 +166,7 @@ const RegisterPage3 = ({

{errors.sourceHeardFrom && printError('A response is required')}
</SectionContainer>
<LoginLink href="/login">Already have an account? Login here</LoginLink>
</Form>

<RegisterFlow
Expand Down
2 changes: 2 additions & 0 deletions components/Register/RegisterPage4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
LabelRadio,
InputRadio,
OtherRadio,
LoginLink,
} from '@/styles/register.styles';

const RegisterPage4 = ({
Expand Down Expand Up @@ -127,6 +128,7 @@ const RegisterPage4 = ({
</OtherRadio>
</InputContainer>
</SectionContainer>
<LoginLink href="/login">Already have an account? Login here</LoginLink>
</Form>

<RegisterFlow
Expand Down
3 changes: 3 additions & 0 deletions components/Register/RegisterPage5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
Button,
Fieldset,
JoinNewsletterContainer,
LoginLink,
} from '@/styles/register.styles';

const RegisterPage5 = ({
Expand Down Expand Up @@ -345,6 +346,8 @@ const RegisterPage5 = ({
</Form>
</FormBorder>

<LoginLink href="/login">Already have an account? Login here</LoginLink>

<ButtonContainer>
<Button form="registerPage5">Submit</Button>
</ButtonContainer>
Expand Down
5 changes: 5 additions & 0 deletions styles/register.styles.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Link from 'next/link';
import styled from 'styled-components';

/**
Expand Down Expand Up @@ -76,6 +77,10 @@ export const FormBorder = styled.div`
padding: 5px 20px 20px 20px;
`;

export const LoginLink = styled(Link)`
text-decoration: underline;
`;

/**
* Form whose formatting adjusts on screen size
*/
Expand Down

0 comments on commit 0d2fdc7

Please sign in to comment.