-
Notifications
You must be signed in to change notification settings - Fork 14
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
Creation of Edit Student Modal- Issue #314 #315
Conversation
… conditions, started styling
This looks like it works and my comments are pretty minor clean-up stuff. One thing I noticed (which is beyond the scope of this Issue/PR) is that you can edit a student even when there's no IEP, which is good, except that the edit form includes the fields for the IEP dates (which also don't render well when there's no dates to load). I don't consider it necessary for this PR, but it might be good to add a quick check and render those last two fields only on the condition that an IEP exists. |
src/pages/students/[student_id].tsx
Outdated
const ViewStudentPage = () => { | ||
const [open, setOpen] = React.useState(false); |
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.
I think this can just be useState instead of React.useState
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.
Changed!
src/pages/students/[student_id].tsx
Outdated
@@ -24,10 +49,11 @@ const ViewStudentPage = () => { | |||
const router = useRouter(); | |||
const { student_id } = router.query; | |||
|
|||
const VIEW_STATES = { MAIN: 0, EDIT: 1 }; | |||
const VIEW_STATES = { MAIN: 0 }; |
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.
It seems like the VIEW_STATES are no longer necessary and they don't change anymore...could we get rid of this altogether?
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.
Removed this, along with other references to view state
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.
I noticed the viewState and setViewState on line 46, which I think are a part of this and also outdated. I didn't even notice this before and I'll still approve
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.
Good catch! Removed this as well.
I also removed some other references to view state, so will request re-review on your end, when you have time! Thanks Connor! |
Link to issue:
#314
Styling will be in a separate issue/PR