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

doctom: Add contact page #113

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

doctom: Add contact page #113

wants to merge 1 commit into from

Conversation

huang0h
Copy link
Contributor

@huang0h huang0h commented Sep 15, 2024

PR review emoji guide: https://github.com/erikthedeveloper/code-review-emoji-guide

ℹ️ Issue

Closes #999

📝 Description

Briefly list the changes made to the code:

  • Added contact page
    • Add form for user contact data
    • Backend API integration to submit user data
  • Update nav bar to link to contact page

✔️ Verification

Contact page:

image

🏕️ (Optional) Future Work / Notes

Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!

@huang0h huang0h changed the title draft changes doctom: Add contact page Sep 15, 2024
@huang0h huang0h closed this Sep 21, 2024
@huang0h huang0h reopened this Jan 23, 2025
@huang0h huang0h reopened this Jan 23, 2025
Copy link
Contributor Author

@huang0h huang0h left a comment

Choose a reason for hiding this comment

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

looks good, a few questions to clarify here:

email: string;
year: string;
major: string;
// TODO: ask if we still want to do user-submitted questions
Copy link
Contributor Author

Choose a reason for hiding this comment

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

❓ Did we ever ask about this? If so, was this implemented or not?

email: string;
year: string;
major: string;
// TODO: ask if we still want to do user-submitted questions
Copy link
Contributor Author

Choose a reason for hiding this comment

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

❓ Did we ever ask about this? If so, was this implemented or not?

return (
<div>
<Container maxWidth="md">
<Helmet>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

❓ What does <Helmet> do? why do we use this

Comment on lines +56 to +80
<TextField
label="First Name"
value={data.firstName}
onChange={(event) => setData({...data, firstName: event.target.value})}
/>
<TextField
label="Last Name"
value={data.lastName}
onChange={(event) => setData({...data, lastName: event.target.value})}
/>
<TextField
label="Email"
value={data.email}
onChange={(event) => setData({...data, email: event.target.value})}
/>
<TextField
label="Graduation Year"
value={data.year}
onChange={(event) => setData({...data, year: event.target.value})}
/>
<TextField
label="Major"
value={data.major}
onChange={(event) => setData({...data, major: event.target.value})}
/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

⛏️ It looks like there's a lot being repeated here - could we possibly abstract this out into something?

/>
</RadioGroup>
<StyledButton onClick={(event) => {
console.log('submitting form', data);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a pretty big function - could we possibly break it up into a few smaller functions?

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.

1 participant