Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
09def26
map exploration, hide expired events, fix weback
chadbrokaw Aug 14, 2025
7060df9
Temporarily disable tests
chadbrokaw Aug 18, 2025
bb76f95
Revert webpack change
chadbrokaw Aug 18, 2025
5f0c362
Improve Search Header
chadbrokaw Aug 18, 2025
c64b311
fix: fix tests and cleanup code
chadbrokaw Sep 2, 2025
cb0661a
reenable tests
chadbrokaw Sep 2, 2025
3a40297
refactor: remove unused zoom change listener from SearchMap component
chadbrokaw Sep 2, 2025
9eb8bd6
fix: Fix BrowseResultsPage
chadbrokaw Sep 2, 2025
da2654a
fix: add some logging
chadbrokaw Sep 2, 2025
e4b1d20
fix: remove console log
chadbrokaw Sep 2, 2025
dc538be
attempt to fix category switching issue
chadbrokaw Sep 2, 2025
bac8449
Don't reset map init
chadbrokaw Sep 2, 2025
4d4e3c9
fix: remove logging
chadbrokaw Sep 2, 2025
a35790a
Pulling events from Open Data Portal
chadbrokaw Aug 29, 2025
baf1c5b
fix: add days of week and allow for series of events
chadbrokaw Sep 2, 2025
35929c7
fix: refresh styles
chadbrokaw Sep 15, 2025
1502628
fix: test
chadbrokaw Sep 15, 2025
38d53f3
fix: remove exploration work for eligibility filtering
chadbrokaw Sep 15, 2025
ef753be
fix: Fix some visual inconsistencies and bugs
chadbrokaw Sep 17, 2025
26c1577
rename featued events and shuffle homepage order
chadbrokaw Sep 18, 2025
b8d6546
fix: calendar section background color
chadbrokaw Sep 18, 2025
26613a6
Remove commented code
chadbrokaw Sep 18, 2025
0b20179
Merge branch 'main' into development
chadbrokaw Sep 18, 2025
d5f8563
Merge branch 'main' into development
chadbrokaw Sep 20, 2025
b3b9fae
fix: ensure https protocol
chadbrokaw Sep 20, 2025
836539b
fix: make it more robust and add security considerations
chadbrokaw Sep 20, 2025
b8132d4
Merge branch 'main' into development
chadbrokaw Sep 24, 2025
0358a39
fix: split apart the calendar
chadbrokaw Sep 24, 2025
d613616
Use React-GTM-Module
chadbrokaw Sep 24, 2025
dcd0c7a
fix: add error boundary and remove GA from development
chadbrokaw Sep 29, 2025
a84ee84
fix: Page not found
chadbrokaw Sep 29, 2025
553ad41
fix: Rearrange featured resources and the calendar
chadbrokaw Sep 29, 2025
a111a44
Review
chadbrokaw Sep 29, 2025
1f630ed
fix: comment
chadbrokaw Sep 29, 2025
58d657d
Merge branch 'main' into development
chadbrokaw Sep 30, 2025
979d47b
Eligibility filtering for senior services
chadbrokaw Sep 30, 2025
3985edb
fix: change language (#355)
chadbrokaw Sep 30, 2025
ec6a81d
fix: limit featured resources to first four
chadbrokaw Oct 10, 2025
3d526a4
fix: event details page
chadbrokaw Oct 10, 2025
030d683
feat: Rework events calendar for agenda view
chadbrokaw Oct 10, 2025
c2244a0
fix: correct featured events navigation
chadbrokaw Oct 17, 2025
d6fa795
Merge branch 'main' into development
chadbrokaw Oct 17, 2025
b9fdba3
test: fix test
chadbrokaw Oct 17, 2025
4d0b8be
fix: lint
chadbrokaw Oct 17, 2025
c321081
code review
chadbrokaw Oct 17, 2025
199ac8b
fix: z-index issue
chadbrokaw Oct 17, 2025
f8abceb
Merge branch 'main' into development
chadbrokaw Oct 20, 2025
cc326b4
fix: remove extra exclusion filters
chadbrokaw Oct 20, 2025
3300bf0
fix: remove comment
chadbrokaw Oct 20, 2025
4a68737
Merge branch 'main' into development
chadbrokaw Oct 20, 2025
b0dbc8e
fix: repurpose feature flag
chadbrokaw Oct 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions app/components/ui/Cards/EventCardSection.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useState, useMemo } from "react";
import { EventCard } from "./EventCard";
import styles from "./EventCardSection.module.scss";
import { Loader } from "../Loader";
Expand All @@ -11,12 +11,24 @@ export const EventCardSection = ({
}) => {
const [showAll, setShowAll] = useState(false);

if (!events) {
// Sort events so featured events come first
const sortedEvents = useMemo(() => {
if (!events) return null;

return [...events].sort((a, b) => {
// Featured items first (true > false, so we reverse the comparison)
if (a.featured && !b.featured) return -1;
if (!a.featured && b.featured) return 1;
return 0;
});
}, [events]);

if (!sortedEvents) {
return <Loader />;
}

const displayedEvents = showAll ? events : events.slice(0, 4);
const hasMoreEvents = events.length > 4;
const displayedEvents = showAll ? sortedEvents : sortedEvents.slice(0, 4);
const hasMoreEvents = sortedEvents.length > 4;

return (
<>
Expand Down
3 changes: 2 additions & 1 deletion app/hooks/StrapiAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function useNavigationData() {
*/
export function useHomePageFeaturedResourcesData() {
const path =
"events?populate[address]=*&populate[calendar_event]=*&populate[page_link]=*&populate[image][populate]=*&filters[featured][$eq]=true";
"events?populate[address]=*&populate[calendar_event]=*&populate[page_link]=*&populate[image][populate]=*";

const dataFetcher = () =>
fetcher<{ data: Array<StrapiDatumResponse<EventResponse>> }>(
Expand Down Expand Up @@ -370,6 +370,7 @@ export interface EventResponse extends BaseDatumAttributesResponse {
image: {
data: { id: number; attributes: ImageResponse };
};
featured: boolean;
page_link: LinkResponse;
registration_link?: LinkResponse | null;
event_categories?: { data: Array<StrapiDatumResponse<CategoryResponse>> };
Expand Down
Loading