File tree Expand file tree Collapse file tree 1 file changed +0
-3
lines changed Expand file tree Collapse file tree 1 file changed +0
-3
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,12 @@ function Card<T extends Record<string, number> & { week: number }>({
4747} : CardProps < T > ) : JSX . Element {
4848 const num = useMemo ( ( ) => {
4949 if ( ! data || ! content ) return undefined ;
50- console . log ( 'Finding current week date...' , data ) ;
5150 const today = data . find ( ( d ) => {
5251 const now = new Date ( ) ;
5352 const monday = new Date ( now . getFullYear ( ) , now . getMonth ( ) , now . getDate ( ) ) ;
5453 monday . setDate ( monday . getDate ( ) - 7 - monday . getDay ( ) + 1 ) ;
5554 return monday . valueOf ( ) === new Date ( d . week ) . valueOf ( ) ;
5655 } ) ;
57- console . log ( 'Found current week date:' , today ) ;
58- console . log ( 'Accessing data:' , content [ 0 ] . dataKey ) ;
5956 return today ? today [ content [ 0 ] . dataKey ] : 0 ;
6057 } , [ data , content ] ) ;
6158
You can’t perform that action at this time.
0 commit comments