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

mui #1732

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open

mui #1732

Changes from 1 commit
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.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import React from 'react';
import { Box } 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">
<Box 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()}
>
evanyang1 marked this conversation as resolved.
Show resolved Hide resolved
<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>
evanyang1 marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -27,22 +28,22 @@ const ReturnUserForm = (props) => {
required
autoComplete="email"
/>
</div>
</Box>
<p>
{"(This allows easy use of the app. We'll never sell your data!)"}
</p>
</div>
</Box>

{props.isError && props.errorMessage.length > 1 &&
<div className="error">{props.errorMessage}</div>
}
{props.isError && props.errorMessage.length > 1 && (
<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>
evanyang1 marked this conversation as resolved.
Show resolved Hide resolved
</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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another <button> component to be switched over to MUI.

</div>
</div>
</Box>
</Box>
)}
</form>
</div>
</div>
</Box>
</Box>
);
};
export default ReturnUserForm;
Loading