-
Notifications
You must be signed in to change notification settings - Fork 6
Skill Categories page now gets settings from query parameters #2272
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
Skill Categories page now gets settings from query parameters #2272
Conversation
| <input | ||
| id="all-skills" | ||
| type="checkbox" | ||
| value="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.
We are using the checked property now instead of the value property.
| <input | ||
| id="all-skills" | ||
| type="checkbox" | ||
| value="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.
We are using the checked property now instead of the value property.
| @@ -1,10 +1,11 @@ | |||
| import React, { useContext, useState } from 'react'; | |||
| import { Link } from 'react-router-dom'; | |||
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.
This was just moved up a few lines.
| <label htmlFor="all-skills">Show all skills</label> | ||
| <input | ||
| onClick={handleClick} | ||
| onChange={handleClick} |
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's recommended to use onChange with checkboxes instead of onClick.
| @@ -1,38 +1,37 @@ | |||
| import React, { useCallback, useContext, useEffect, useState } from 'react'; | |||
| import { styled } from '@mui/material/styles'; | |||
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 reordered several of the imports.
| const [query, setQuery] = useState(''); | ||
| const [skillFilter, setSkillFilter] = useState(null); | ||
|
|
||
| useQueryParameters([ |
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.
This adds support for maintaining state with query parameters.
|
|
||
| const handleClick = () => setShowAllSkills(!showAllSkills); | ||
|
|
||
| useQueryParameters([ |
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.
This adds support for maintaining state with query parameters.
S78901
left a comment
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.
Looks good!
No description provided.