Skip to content

Commit 939fd62

Browse files
authored
feat: results button/link added to townhall page (#750)
* fix: added word-break to prevent overflowing text on event cards * feat: results button/link added to townhall page * fix: "Results" button changed to "Survey Results"
1 parent 15dc4c6 commit 939fd62

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

pages/town-hall.js

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ function TownHall() {
189189

190190
{townHall.status ? (
191191
<p>
192-
The {townHall.quarter} Town Hall took place on <b>{townHall.date}</b> (Week {townHall.week})
193-
at <b>{townHall.time} PT</b> in the {townHall.location}.
192+
The {townHall.quarter} Town Hall took place on{' '}
193+
<b>{townHall.date}</b> (Week {townHall.week}) at{' '}
194+
<b>{townHall.time} PT</b> in the {townHall.location}.
194195
</p>
195196
) : (
196197
<p style={TBD}>{townHall.status_text}</p>
@@ -344,7 +345,25 @@ function TownHall() {
344345
Event Notes
345346
</a>
346347
</Link>
347-
</li>
348+
</li>{' '}
349+
{pastTownHall.results && (
350+
<li style={inlineButtonListStyle}>
351+
<Link href={pastTownHall.results}>
352+
<a
353+
className="button"
354+
target="_blank"
355+
rel="noopener noreferrer"
356+
>
357+
<FontAwesomeIcon
358+
icon={faFileAlt}
359+
fixedWidth
360+
aria-hidden={true}
361+
/>{' '}
362+
Survey Results
363+
</a>
364+
</Link>
365+
</li>
366+
)}
348367
</ul>
349368
</div>
350369
<div>

scripts/town-hall-generator.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async function fetchTownHallData() {
5757
}
5858

5959
async function fetchPastTownHallData() {
60-
const data = await getGoogleSheetData('PastTownHalls!A3:G');
60+
const data = await getGoogleSheetData('PastTownHalls!A3:H');
6161

6262
// Format the rows into an array of objects
6363
const formattedData = data.map((row) => ({
@@ -68,6 +68,7 @@ async function fetchPastTownHallData() {
6868
notes: row[4],
6969
banner: row[5],
7070
alt_text: row[6],
71+
results: row[7],
7172
}));
7273

7374
return formattedData;

0 commit comments

Comments
 (0)