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

added signup as react component #79

Merged
merged 6 commits into from
Jun 26, 2024
Merged

Conversation

Pybite
Copy link
Collaborator

@Pybite Pybite commented Jun 25, 2024

resolved issue #76

@nbkhope
Copy link
Member

nbkhope commented Jun 25, 2024

Did you test it's working? you should add a new route in routes.js.

Add

{
  path: '/sign-up',
  element: <Signup />
},

to the array:

{
index: true,
element: <div>Home Page</div>,
},
{
path: '/reset-password',
element: <ResetPasswordForm />
},
{
path: '/messages',
element: <Messages />
}

Don't forget the import

import '../components/signup.css';
import '../global.css';

export default function signup(){
Copy link
Member

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

Suggested change
export default function signup(){
export default function Signup(){

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahh yes i forgot !

export default function Signup(){
return (
<>
<header className="site-header">
Copy link
Member

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)

Copy link
Member

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok will do :)

</form>
</div>
</main>
<footer className="site-footer">
Copy link
Member

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)

Copy link
Member

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

Copy link
Collaborator Author

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

Copy link
Member

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)

@nbkhope
Copy link
Member

nbkhope commented Jun 26, 2024

amazing!

@nbkhope nbkhope merged commit 76f027c into nbktechworld:master Jun 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants