Skip to content

Commit

Permalink
feat: results button/link added to townhall page (#750)
Browse files Browse the repository at this point in the history
* 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"
  • Loading branch information
Kevin-D23 authored Jan 28, 2025
1 parent 15dc4c6 commit 939fd62
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
25 changes: 22 additions & 3 deletions pages/town-hall.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ function TownHall() {

{townHall.status ? (
<p>
The {townHall.quarter} Town Hall took place on <b>{townHall.date}</b> (Week {townHall.week})
at <b>{townHall.time} PT</b> in the {townHall.location}.
The {townHall.quarter} Town Hall took place on{' '}
<b>{townHall.date}</b> (Week {townHall.week}) at{' '}
<b>{townHall.time} PT</b> in the {townHall.location}.
</p>
) : (
<p style={TBD}>{townHall.status_text}</p>
Expand Down Expand Up @@ -344,7 +345,25 @@ function TownHall() {
Event Notes
</a>
</Link>
</li>
</li>{' '}
{pastTownHall.results && (
<li style={inlineButtonListStyle}>
<Link href={pastTownHall.results}>
<a
className="button"
target="_blank"
rel="noopener noreferrer"
>
<FontAwesomeIcon
icon={faFileAlt}
fixedWidth
aria-hidden={true}
/>{' '}
Survey Results
</a>
</Link>
</li>
)}
</ul>
</div>
<div>
Expand Down
3 changes: 2 additions & 1 deletion scripts/town-hall-generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function fetchTownHallData() {
}

async function fetchPastTownHallData() {
const data = await getGoogleSheetData('PastTownHalls!A3:G');
const data = await getGoogleSheetData('PastTownHalls!A3:H');

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

return formattedData;
Expand Down

0 comments on commit 939fd62

Please sign in to comment.