Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-digitalkarma committed Jul 24, 2023
1 parent 6bdf473 commit fc3840f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
4 changes: 4 additions & 0 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ const App = () => {
</Helmet>
<Router>
<Landing path="/" />
<Login path="login" />
<Register path="register" />
<Stories path="stories" />
<AddStory path="addstory" />
</Router>
</HelmetProvider>
</AuthContainer>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ export default function UserStoryCard(props) {
<CardHeader
avatar={
<Avatar aria-label="recipe" className={classes.avatar}>
{props.user.lastInitial}
{props.user.firstName}
</Avatar>
}
title={props.title}
subheader={props.user.firstName}
subheader={props.user.lastInitial}
/>
<CardMedia
className={classes.media}
Expand Down
27 changes: 15 additions & 12 deletions frontend/src/hooks/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ import styled from "styled-components";
import { useAuthStore } from "../contexts/auth";

const Wrapper = styled.div`
display: flex;
padding: 20px;
`;

const StyledInput = styled.input`
padding: 10px;
height: 50px;
`;

export const Register = () => {
const [formData, setFormData] = useState({
firstName: "",
Expand All @@ -32,39 +38,36 @@ export const Register = () => {

return (
<Wrapper>
<h1>Register Form</h1>
{state.isAuthenticated}
<form onSubmit={(e) => handleSubmit(e)}>
<input
<StyledInput
type="text"
name="firstName"
className="form-control"
placeholder="John"
placeholder="First Name"
id="firstName"
value={firstName}
onChange={(e) => onChange(e)}
required
/>
<input
<StyledInput
type="text"
name="lastInitial"
id="lastInitial"
placeholder="D"
placeholder="Last Name Initial"
value={lastInitial}
onChange={(e) => onChange(e)}
required
autoComplete="false"
/>
<input
type="text"
<StyledInput
type="email"
name="email"
id="email"
placeholder="Email"
value={email}
onChange={(e) => onChange(e)}
autoComplete="false"
/>
<input
<StyledInput
type="password"
name="password"
id="password"
Expand All @@ -75,7 +78,7 @@ export const Register = () => {
placeholder="Password"
/>

<input
<StyledInput
type="text"
name="phone"
id="phone"
Expand All @@ -84,7 +87,7 @@ export const Register = () => {
placeholder="Phone (optional)"
/>
<br />
<input type="submit" value="Submit" />
<StyledInput type="submit" value="Submit" />
</form>
</Wrapper>
);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const Stories = (props) => {
Interaction Design.org
</a>
</p>
<Link to="/add-story">Add Story</Link>
<Link to="/addstory">Add Story</Link>
<Container>
<ul>
{stories !== null &&
Expand Down

0 comments on commit fc3840f

Please sign in to comment.