@@ -5,6 +5,7 @@ import Image from 'next/legacy/image';
5
5
import Link from 'next/link' ;
6
6
import { NextSeo } from 'next-seo' ;
7
7
8
+ import { useEffect , useState } from 'react' ;
8
9
import Countdown from 'react-countdown' ;
9
10
10
11
import Banner from '../components/Banner' ;
@@ -23,7 +24,6 @@ import studioLogo from '../public/images/committees/studio_wordmark.svg';
23
24
import teachlaLogo from '../public/images/committees/teachLA_wordmark.svg' ;
24
25
import wLogo from '../public/images/committees/w_wordmark.svg' ;
25
26
import googleSlideLogo from '../public/images/slides.png' ;
26
- import winterGMgraphic from '../public/images/Winter_GM_2025_graphic.png' ;
27
27
28
28
const inlineButtonListStyle = {
29
29
display : 'inline-block' ,
@@ -102,6 +102,7 @@ const parseGMData = (jsonContent) => {
102
102
gm_end_time : new Date ( data ?. gm_end_time ) ,
103
103
rsvp_link : data ?. rsvp_link ,
104
104
quarter : data ?. quarter ,
105
+ banner_link : data ?. banner_link ,
105
106
slides_link : data ?. slides_link ,
106
107
location : data ?. location ,
107
108
day_of_week : dayToName ( startTime . getDay ( ) ) ,
@@ -165,9 +166,14 @@ const GMCountdown = (props) => {
165
166
} ;
166
167
167
168
function gm ( ) {
168
-
169
169
const pastGMs = [ ...pastData ] . reverse ( ) ;
170
170
const data = parseGMData ( gmData ) ;
171
+ const [ mounted , setMounted ] = useState ( false ) ;
172
+
173
+ useEffect ( ( ) => {
174
+ setMounted ( true ) ;
175
+ } , [ ] ) ;
176
+
171
177
function countdownRenderer ( { days, hours, minutes, seconds, completed } ) {
172
178
const { dayString, hourString, minuteString, secondString } =
173
179
calculateTimeStrings ( { days, hours, minutes, seconds } ) ;
@@ -233,12 +239,15 @@ function gm() {
233
239
< Banner decorative />
234
240
< div className = "text-center" >
235
241
< Image
236
- src = { winterGMgraphic }
242
+ src = { data . banner_link }
237
243
className = "gm-graphic"
244
+ layout = "fill"
238
245
alt = { `${ data . quarter } GM ${ data . gm_start_time . getFullYear ( ) } Marketing Graphic. ${ data . quarter } GM will happen on ${ data . day_of_week } , ${ data . gm_start_time . getMonth ( ) } ${ data . date_with_suffix } from ${ data . gm_start_time . getHours ( ) } :${ data . gm_start_time . getMinutes ( ) } to ${ data . gm_end_time . getHours ( ) } :${ data . gm_end_time . getMinutes ( ) } in ${ data . location } ` }
239
246
/>
240
247
</ div >
241
- < Countdown date = { data . gm_start_time } renderer = { countdownRenderer } />
248
+ { mounted && (
249
+ < Countdown date = { data . gm_start_time } renderer = { countdownRenderer } />
250
+ ) }
242
251
< div className = "content-container-tight text-center" >
243
252
< div id = "info-wrapper" >
244
253
< h2 > Relevant information</ h2 >
0 commit comments