Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change some elements to mui -- more changes impending #1689

Draft
wants to merge 5 commits into
base: development
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 24 additions & 23 deletions client/src/components/presentational/returnUserForm.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import React from 'react';
import { Box, Container, CircularProgress, FormControl, Typography } from '@mui/material';

const ReturnUserForm = (props) => {
return (
<div className="check-in-container">
<div className="check-in-headers">
<h3>Welcome back!</h3>
</div>
<div className="check-in-form">
<Container className="check-in-container">
<Box className="check-in-headers">
<Typography variant='h3'>Welcome back!</Typography>
</Box>
<Box className="check-in-form">
<form
className="form-check-in"
autoComplete="on"
onSubmit={(e) => e.preventDefault()}
>
<div className="form-row">
<div className="form-input-text">
<Box className="form-row">
<Box className="form-input-text">
<label htmlFor="email">
Which email address did you use to check-in last time?
</label>
Expand All @@ -27,22 +28,22 @@ const ReturnUserForm = (props) => {
required
autoComplete="email"
/>
</div>
<p>
</Box>
<Typography>
{"(This allows easy use of the app. We'll never sell your data!)"}
</p>
</div>
</Typography>
</Box>

{props.isError && props.errorMessage.length > 1 &&
<div className="error">{props.errorMessage}</div>
<Box className="error">{props.errorMessage}</Box>
}
{props.user === false && (
<div className="error">Try entering your email again.</div>
<Box className="error">Try entering your email again.</Box>
)}

{!props.user && !props.isLoading ? (
<div className="form-row">
<div className="form-input-button">
<Box className="form-row">
<Box className="form-input-button">
<button
type="submit"
className="form-check-in-submit"
Expand All @@ -53,24 +54,24 @@ const ReturnUserForm = (props) => {
>
CHECK IN
</button>
</div>
</div>
</Box>
</Box>
) : (
<div className="form-row">
<div className="form-input-button">
<Box className="form-row">
<Box className="form-input-button">
<button
type="submit"
className="form-check-in-submit block"
onClick={(e) => e.preventDefault()}
>
CHECKING IN...
</button>
</div>
</div>
</Box>
</Box>
)}
</form>
</div>
</div>
</Box>
</Container>
);
};
export default ReturnUserForm;
Loading