Skip to content

Commit

Permalink
merge changes for AuthLogin with master
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyc1 committed Dec 6, 2023
1 parent bc22e6c commit fb60751
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions frontend/src/pages/AuthLogin/AuthLogin.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { AlertTitle } from '@mui/material';

Check warning on line 1 in frontend/src/pages/AuthLogin/AuthLogin.tsx

View workflow job for this annotation

GitHub Actions / lint

'AlertTitle' is defined but never used
import React, { useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
import { AuthForm } from 'components';
import { Button } from '@trussworks/react-uswds';
import { useAuthContext } from 'context';
import { Alert } from '@mui/material';

Check warning on line 5 in frontend/src/pages/AuthLogin/AuthLogin.tsx

View workflow job for this annotation

GitHub Actions / lint

'Alert' is defined but never used
import { Button } from '@trussworks/react-uswds';
import { Box, Link, Typography } from '@mui/material';

Check warning on line 7 in frontend/src/pages/AuthLogin/AuthLogin.tsx

View workflow job for this annotation

GitHub Actions / lint

'Box' is defined but never used

Check warning on line 7 in frontend/src/pages/AuthLogin/AuthLogin.tsx

View workflow job for this annotation

GitHub Actions / lint

'Link' is defined but never used
import { RegisterForm } from 'components/Register/RegisterForm';
import {
Authenticator,
ThemeProvider,
Expand All @@ -29,7 +30,7 @@ export const AuthLogin: React.FC<{ showSignUp?: boolean }> = ({
}) => {
const { apiPost, refreshUser } = useAuthContext();
const [errors, setErrors] = useState<Errors>({});

const [open, setOpen] = useState<boolean>(false);
// Once a user signs in, call refreshUser() so that the callback is called and the user gets signed in.
const { authStatus } = useAuthenticator((context) => [context.isPending]);
useEffect(() => {
Expand Down Expand Up @@ -151,13 +152,13 @@ export const AuthLogin: React.FC<{ showSignUp?: boolean }> = ({
<AuthForm onSubmit={onSubmit}>
<h1>Welcome to Crossfeed</h1>
{errors.global && <p className="text-error">{errors.global}</p>}
<Button type="submit" size="large">
<Button type="submit" size="big">
Login with Login.gov
</Button>
<Typography>
<h5>New to Crossfeed? Register with Login.gov</h5>
</Typography>
{open && <RegisterForm open={open} onClose={onClose} />}
{open && <RegisterForm open={open} onClose={onclose} />}
<Button type="submit" size="big" onClick={() => setOpen(true)}>
Register
</Button>
Expand Down

0 comments on commit fb60751

Please sign in to comment.