Skip to content

Commit 9bf86f0

Browse files
authored
Updated GM page and added temp Fall 2025 graphic (#827)
1 parent 5fe2d0b commit 9bf86f0

15 files changed

+15
-5
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
node-version: [20.x]
2323

2424
env:
25+
DATAHUB_SPREADSHEET_ID: ${{ secrets.DATAHUB_SPREADSHEET_ID }}
2526
EVENTS_SPREADSHEET_ID: ${{ secrets.EVENTS_SPREADSHEET_ID }}
2627
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
2728
DIRECTORY_SPREADSHEET_ID: ${{ secrets.DIRECTORY_SPREADSHEET_ID }}

pages/gm.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Image from 'next/legacy/image';
55
import Link from 'next/link';
66
import { NextSeo } from 'next-seo';
77

8+
import { useEffect, useState } from 'react';
89
import Countdown from 'react-countdown';
910

1011
import Banner from '../components/Banner';
@@ -23,7 +24,6 @@ import studioLogo from '../public/images/committees/studio_wordmark.svg';
2324
import teachlaLogo from '../public/images/committees/teachLA_wordmark.svg';
2425
import wLogo from '../public/images/committees/w_wordmark.svg';
2526
import googleSlideLogo from '../public/images/slides.png';
26-
import winterGMgraphic from '../public/images/Winter_GM_2025_graphic.png';
2727

2828
const inlineButtonListStyle = {
2929
display: 'inline-block',
@@ -102,6 +102,7 @@ const parseGMData = (jsonContent) => {
102102
gm_end_time: new Date(data?.gm_end_time),
103103
rsvp_link: data?.rsvp_link,
104104
quarter: data?.quarter,
105+
banner_link: data?.banner_link,
105106
slides_link: data?.slides_link,
106107
location: data?.location,
107108
day_of_week: dayToName(startTime.getDay()),
@@ -165,9 +166,14 @@ const GMCountdown = (props) => {
165166
};
166167

167168
function gm() {
168-
169169
const pastGMs = [...pastData].reverse();
170170
const data = parseGMData(gmData);
171+
const [mounted, setMounted] = useState(false);
172+
173+
useEffect(() => {
174+
setMounted(true);
175+
}, []);
176+
171177
function countdownRenderer({ days, hours, minutes, seconds, completed }) {
172178
const { dayString, hourString, minuteString, secondString } =
173179
calculateTimeStrings({ days, hours, minutes, seconds });
@@ -233,12 +239,15 @@ function gm() {
233239
<Banner decorative />
234240
<div className="text-center">
235241
<Image
236-
src={winterGMgraphic}
242+
src={data.banner_link}
237243
className="gm-graphic"
244+
layout="fill"
238245
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}`}
239246
/>
240247
</div>
241-
<Countdown date={data.gm_start_time} renderer={countdownRenderer} />
248+
{mounted && (
249+
<Countdown date={data.gm_start_time} renderer={countdownRenderer} />
250+
)}
242251
<div className="content-container-tight text-center">
243252
<div id="info-wrapper">
244253
<h2>Relevant information</h2>
File renamed without changes.
290 KB
Loading
File renamed without changes.

0 commit comments

Comments
 (0)