File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/views/Home/components/ActionButtons Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11import { FC , useCallback } from "react" ;
2- import data from "../../../../data/2024 .json" ;
2+ import data from "../../../../data/2025 .json" ;
33import Button from "../../../../components/UI/Button" ;
44import styled from "styled-components" ;
5+ import { isWithinInterval } from "date-fns" ;
56import { BIG_BREAKPOINT } from "../../../../constants/BreakPoints" ;
67import { gaEventTracker } from "../../../../components/analytics/Analytics" ;
78
@@ -24,8 +25,9 @@ const ActionButtons: FC<React.PropsWithChildren<unknown>> = () => {
2425 const sponsorshipEndDay = new Date ( data . sponsors . endDate ) ;
2526 const today = new Date ( ) ;
2627
28+
2729 const isBetween = ( startDay : Date , endDay : Date ) : boolean =>
28- startDay < new Date ( ) && endDay > today ;
30+ isWithinInterval ( today , { start : startDay , end : endDay } ) ;
2931
3032 const trackSponsorshipInfo = useCallback ( ( ) => {
3133 gaEventTracker ( "sponsorship" , "sponsorship" ) ;
@@ -39,6 +41,7 @@ const ActionButtons: FC<React.PropsWithChildren<unknown>> = () => {
3941 gaEventTracker ( "CFP" , "CFP" ) ;
4042 } , [ ] ) ;
4143
44+
4245 return (
4346 < StyledActionDiv >
4447 < Button
You can’t perform that action at this time.
0 commit comments