Skip to content

Update fork #1

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

Merged
merged 44 commits into from
Jul 19, 2020
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
eca16f1
Remove question list
Feb 3, 2020
b56297d
Update question list phrasing
Feb 3, 2020
ce42595
Add Suggestion section and polish website description
Feb 3, 2020
dd28d31
Update README title to reflect the new repo name
Feb 3, 2020
9660989
Move website material into master
Feb 3, 2020
200f31e
Remove yarn.lock
Mar 21, 2020
fe4affa
Update Amazon icon
Mar 21, 2020
e8aaee4
Update react-script to ^3.4.0
Mar 21, 2020
e4f6b41
Update company icons
Mar 21, 2020
268fc0f
Update package-lock.json
Apr 16, 2020
006eb24
Add ability to filter by dropdown for Pattern and Difficulty
Apr 16, 2020
f018370
Patch security vulnerabilities
May 11, 2020
efda73c
Fix layout "jump" when switching between tabs
May 11, 2020
95b2a8b
Remove table border and extraneous container pieces
May 11, 2020
ed7231c
Update font size to 14
May 11, 2020
8c11304
Remove unused variables
May 11, 2020
b8648d0
Add responsive attribute to Table component
May 11, 2020
b0d6d8f
Remove unused column filter code
May 11, 2020
f8b273c
Add tool-tip for Companies header
May 11, 2020
0455bc5
Update company list - May 2020
May 11, 2020
bbaf1e8
Update package-lock.json to fix security loophole
May 20, 2020
43b9c2b
Add Square company icon
May 26, 2020
56a3d43
Added Trie Category Questions (#9)
mm1705 May 26, 2020
e0bd606
Fix formatting errors for src/data/index.js
May 26, 2020
d45088f
Add default sort for question list
May 26, 2020
a62d350
Sort pattern dropdown list values
May 27, 2020
4429019
Update target-sum question pattern from Backtracking to DFS (#15)
Jun 3, 2020
ce12d85
Add GNU GPLv3 License (#17)
Jun 5, 2020
4af578f
Show lock icon for Leetcode Premium questions (#19)
Jun 5, 2020
c39d65c
Enable table headers to be stickied when scrolling (#20)
Jun 5, 2020
5423f06
Enable sorting question list via Companies (#21)
Jun 5, 2020
2a91f1b
Allow multiple patterns per question (#22)
Jun 6, 2020
848d7b8
Remove remaining K-Way Merge question
Jun 6, 2020
68e5746
Condense Modified Binary Search pattern to Binary Search
Jun 6, 2020
f347e0a
Remove Top K Elements patterns
Jun 6, 2020
46c7b00
Update Amazon icon
Jun 7, 2020
be6c0d2
Hide patterns by default (#28)
Jun 9, 2020
19dcb51
Add toggle to show/hide patterns (#32)
Jun 27, 2020
831d71d
Bump websocket-extensions from 0.1.3 to 0.1.4 (#33)
dependabot[bot] Jun 27, 2020
4dfc0d4
Show patterns by default (#34)
Jun 27, 2020
c1ea555
Resize localStorage checklist array when new questions are added (#35)
Jun 27, 2020
c63d261
Center pattern toggle
Jun 27, 2020
8ebdb87
Show pattern for completed questions (#37)
Jun 27, 2020
3bb240f
Update npm packages
Jul 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Show patterns by default (#34)
Follow-up to #31
  • Loading branch information
Sean authored Jun 27, 2020
commit 4dfc0d46e539f77bb572f8c694891637a966027b
17 changes: 8 additions & 9 deletions src/components/Table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,17 @@ const Table = () => {
new Array(questions.length).fill(false),
);

const [hidePatterns, setHidePatterns] = useState(
JSON.parse(localStorage.getItem('hidePatterns')) ||
new Array(1).fill(false),
const [showPatterns, setShowPatterns] = useState(
JSON.parse(localStorage.getItem('showPatterns')) || new Array(1).fill(true),
);

useEffect(() => {
window.localStorage.setItem('checked', JSON.stringify(checked));
}, [checked]);

useEffect(() => {
window.localStorage.setItem('hidePatterns', JSON.stringify(hidePatterns));
}, [hidePatterns]);
window.localStorage.setItem('showPatterns', JSON.stringify(showPatterns));
}, [showPatterns]);

const data = React.useMemo(() => questions, []);

Expand Down Expand Up @@ -123,14 +122,14 @@ const Table = () => {
<span>Show/Hide Patterns </span>
<Toggle
id="pattern-toggle"
defaultChecked={hidePatterns[0]}
defaultChecked={showPatterns[0]}
icons={{
checked: null,
unchecked: null,
}}
onChange={() => {
hidePatterns[0] = !hidePatterns[0];
setHidePatterns([...hidePatterns]);
showPatterns[0] = !showPatterns[0];
setShowPatterns([...showPatterns]);
}}
/>
</label>
Expand All @@ -143,7 +142,7 @@ const Table = () => {
.map(pattern => {
return (
<Badge key={pattern} className={pattern} pill>
{hidePatterns[0] ? pattern : '***'}
{showPatterns[0] ? pattern : '***'}
</Badge>
);
});
Expand Down