-
Notifications
You must be signed in to change notification settings - Fork 13
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
added signup as react component #79
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import '../components/signup.css'; | ||
import '../global.css'; | ||
|
||
export default function Signup(){ | ||
return ( | ||
<> | ||
<header className="site-header"> | ||
<h1><a href="index.html" className="site-header-heading">FSWD</a></h1> | ||
</header> | ||
<main> | ||
<nav aria-label="breadcrumb" className="breadcrumb"> | ||
<ul> | ||
<li><a href="index.html">Home</a></li> | ||
<li><span aria-current="page">Sign-up</span></li> | ||
</ul> | ||
</nav> | ||
<div id="main-container"> | ||
<form action="https://jsonplaceholder.typicode.com/users" method="POST" id="sign-up-form"> | ||
<div className="form-group"> | ||
<label for="sign-up-form-name">Name</label> | ||
<input type="text" id="sign-up-form-name" name="name" required/> | ||
</div> | ||
<div className="form-group"> | ||
<label for="sign-up-form-email">Email</label> | ||
<input type="email" name="email" required id="sign-up-form-email"/> | ||
</div> | ||
<div className="form-group"> | ||
<label for="sign-up-form-password">Password</label> | ||
<input type="password" name="password" id="sign-up-form-password"/> | ||
</div> | ||
<div className="form-group"> | ||
<label for="sign-up-form-dob">Date of Birth</label> | ||
<input type="date" name="dateOfBirth" id="sign-up-form-dob"/> | ||
</div> | ||
<div className="form-group"> | ||
<label>Notification Preference</label> | ||
<label><input type="radio" name="notificationPreference"/> Email</label> | ||
<label><input type="radio" name="notificationPreference"/> Phone</label> | ||
<label><input type="radio" name="notificationPreference"/> None</label> | ||
</div> | ||
|
||
<div className="form-group"> | ||
<label for="sign-up-form-bio">Write About Yourself</label> | ||
<textarea name="biography" id="sign-up-form-bio" rows="3"></textarea> | ||
</div> | ||
<div className="form-group"> | ||
<div> | ||
<label><input type="checkbox" name="agreeToTerms" value="true"/> I agree to the terms and conditions</label> | ||
</div> | ||
<div> | ||
<label><input type="checkbox" name="subscribeToNewsLetter"/> Subscribe to newsletter</label> | ||
</div> | ||
</div> | ||
<div> | ||
<input type="submit" value="Sign Up"/> | ||
</div> | ||
</form> | ||
</div> | ||
</main> | ||
<footer className="site-footer"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the footer is common to all pages, we should move it to App.js (this is the component that defines the layout for all pages) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Pybite I want you to test the app as is. If you had done that you would see there is a double footer at the bottom. You can There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. at first I was having a bit of a issue starting it up but I got it working There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Pybite yeah so you make sure no errors appear in npm start and in the browser (check browser console too) |
||
Copyright © Full Stack Web Dev | ||
</footer> | ||
</> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the header is common to all pages, we should move it to App.js (this is the component that defines the layout for all pages)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theres probably a header there already but its very simple. You should replace that one with this one here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok will do :)