Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use questions json and run cron #206

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
seanprashad merged 2 commits into seanprashad:master from leo-step:use-questions-json
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion .github/workflows/run-cron.yml
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: run-cron

on: workflow_dispatch
on:
schedule:
- cron: '0 0 * * 0'
Copy link
Owner

@seanprashad seanprashad Aug 2, 2022

Choose a reason for hiding this comment

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

For future reference, 00:00 UTC is 8:00pm EDT/5:00pm PDT:

Screenshot 2022年08月01日 at 10 26 56 PM

See https://crontab.guru/#0_0_*_*_0


workflow_dispatch:

jobs:
update:
Expand Down
2 changes: 1 addition & 1 deletion cron/update_questions.py
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
'''

questions_file = "questions.json"
questions_file = "../src/data/questions.json"

print("Reading questions file")

Expand Down
10 changes: 9 additions & 1 deletion package-lock.json
View file Open in desktop

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"react-ga": "^2.7.0",
"react-icons": "^3.11.0",
"react-markdown": "^4.3.1",
"react-scripts": "4.0.0",
"react-scripts": "^4.0.0",
"react-scroll": "^1.8.0",
"react-table": "^7.6.3",
"react-test-renderer": "^16.14.0",
Expand Down
6 changes: 2 additions & 4 deletions src/components/Table/index.js
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const Table = () => {
return (
<NavLink
target="_blank"
href={cellInfo.row.original.url}
href={`https://leetcode.com/problems/${cellInfo.row.original.url}/`}
onClick={() => {
Event(
'Table',
Expand All @@ -266,9 +266,7 @@ const Table = () => {
accessor: 'solutions',
disableSortBy: true,
Cell: cellInfo => {
const url = cellInfo.row.original.premium
? `${cellInfo.row.original.url}/`
: cellInfo.row.original.url;
const url = `https://leetcode.com/problems/${cellInfo.row.original.url}/`;
Copy link
Owner

@seanprashad seanprashad Aug 2, 2022

Choose a reason for hiding this comment

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

Thanks for the update here - I'm trying to remember why I had this conditional in the first place.. so weird 😅

leo-step reacted with laugh emoji
return (
<NavLink
target="_blank"
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /