-
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
Conversation
Did you test it's working? you should add a new route in routes.js. Add
to the array: full-stack-web-dev/web-client/src/routes.js Lines 11 to 22 in 3345562
Don't forget the import |
web-client/src/pages/signup.js
Outdated
import '../components/signup.css'; | ||
import '../global.css'; | ||
|
||
export default function signup(){ |
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.
Component names should always use PascalCase
export default function signup(){ | |
export default function Signup(){ |
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.
Ahh yes i forgot !
web-client/src/pages/signup.js
Outdated
export default function Signup(){ | ||
return ( | ||
<> | ||
<header className="site-header"> |
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 :)
web-client/src/pages/signup.js
Outdated
</form> | ||
</div> | ||
</main> | ||
<footer className="site-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 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 comment
The 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 npm start
to see the app running, then you change the URL, add /signup
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.
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 comment
The 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)
amazing! |
resolved issue #76