Skip to content

Commit 85850d6

Browse files
committed
clean up and update data tip
1 parent 6a1d133 commit 85850d6

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

cron/update_questions.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@
3232

3333
api_instance = leetcode.DefaultApi(leetcode.ApiClient(configuration))
3434

35-
for question in questions["data"]:
36-
# for x in range(1):
37-
# question = questions["data"][0]
38-
35+
for question in questions["data"]:
3936
graphql_request = leetcode.GraphqlQuery(
4037
query='''query questionData($titleSlug: String!) {
4138
question(titleSlug: $titleSlug) {

src/components/Table/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,13 @@ const Table = () => {
385385
},
386386
Cell: cellInfo => {
387387
const companies = cellInfo.row.original.companies.map(company => {
388+
const infoText = `${company} (${company.frequency})`;
388389
return (
389390
<img
390-
key={company}
391-
src={`${iconPath}${company}.png`}
392-
alt={company}
393-
data-tip={company}
391+
key={company.name}
392+
src={`${iconPath}${company.name}.png`}
393+
alt={infoText}
394+
data-tip={infoText}
394395
/>
395396
);
396397
});

0 commit comments

Comments
 (0)