File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
23
23
} from './filters' ;
24
24
import { Event } from '../Shared/Tracking' ;
25
25
26
- import questions from '../../data' ;
26
+ import questions , { updated } from '../../data' ;
27
27
28
28
import 'react-toggle/style.css' ;
29
29
import './styles.scss' ;
@@ -353,13 +353,20 @@ const Table = () => {
353
353
} ,
354
354
{
355
355
Header : ( ) => {
356
+ const date = new Date ( updated ) ;
357
+ const month = date . toLocaleString ( 'default' , {
358
+ month : 'long' ,
359
+ } ) ;
360
+ const year = date . getFullYear ( ) ;
356
361
return (
357
362
< >
358
363
< div
359
364
style = { { whiteSpace : 'nowrap' , display : 'inline-block' } }
360
365
>
361
366
Companies{ ' ' }
362
- < span data-tip = "Companies retrieved from Leetcode Premium (January 2022)" >
367
+ < span
368
+ data-tip = { `Companies retrieved from Leetcode Premium (${ month } ${ year } )` }
369
+ >
363
370
< FaQuestionCircle />
364
371
</ span >
365
372
</ div >
Original file line number Diff line number Diff line change 1
1
import questions from './questions.json' ;
2
2
3
3
const sortBy = { Easy : 0 , Medium : 1 , Hard : 2 } ;
4
+ const { updated, data } = questions ;
4
5
5
- export default questions . data . sort (
6
- ( a , b ) => sortBy [ a . difficulty ] - sortBy [ b . difficulty ] ,
7
- ) ;
6
+ export { updated } ;
7
+ export default data . sort ( ( a , b ) => sortBy [ a . difficulty ] - sortBy [ b . difficulty ] ) ;
You can’t perform that action at this time.
0 commit comments