Feature/backend data integration#102
Open
deb-coder-man wants to merge 8 commits into
Open
Conversation
henryhlly
reviewed
Jun 3, 2026
| import { useExecs } from '@/hooks/useExecs' | ||
|
|
||
| const SKELETON_KEYS = [ | ||
| 'sk-1', |
Contributor
There was a problem hiding this comment.
Is this array only used for skeleton card indexing, cuz if so no need to create a hardcoded array. I think there are easier ways to just create an array of increasing numbers.
henryhlly
reviewed
Jun 3, 2026
| const LOAD_MORE_STEP = 6 | ||
|
|
||
| // Maps a Supabase Event row to the shape PastEventCard expects | ||
| function toPastEvent(event: Event): PastEvent { |
Contributor
There was a problem hiding this comment.
Why do we need a mapping function the PastEventCard should handle generic events?
…ckend-data-integration chore: merging main into branch to update db schema
henryhlly
requested changes
Jun 3, 2026
henryhlly
left a comment
Contributor
There was a problem hiding this comment.
This is way better, good shit dave, just a couple of questions then Ill approve
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Replaces static mock data and CMS REST API calls with direct Supabase queries for the three public-facing data collections: events, execs, and sponsors.
Supabase client
@supabase/supabase-jsto the web packagesupabase.tsclient driven byNEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEYenv varsNew data hooks (
web/src/hooks/)useExecs()— fetches exec members sorted by year descending; joins themediatable onphoto_idto resolve photo URLs in one queryuseSponsors()— fetches all sponsors sorted alphabetically; joinsmediaonlogo_idfor logo URLsuseSponsorOfTheWeek()— fetches the single sponsor withis_sponsor_of_the_week = trueusing.single()Refactored hooks
useEvents/useUpcomingEvents/usePastEvents— switched fromfetchFromCMSto Supabase; cover image joined frommediaviacover_image_idUpdated types (
web/src/types/)Event,Exec,Sponsortypes updated to snake_case column names matching Payload's PostgreSQL schema (e.g.is_upcoming,cover_image_id→ joinedcover_image,is_sponsor_of_the_week)UI connected to live data
ExecGrid— replacesexecData.tsstatic array withuseExecs(); shows 8 animated pulse skeletons while loading, falls back to/mascot.pngif no photo uploadedPastEventsSection— replacespastEventsstatic array withusePastEvents(); maps SupabaseEventrows to thePastEventshape via atoPastEventhelper; search and category filters work against live data; shows skeleton cards while loadingpastEventsData.ts— staticpastEventsarray removed;PastEvent/EventFiltertypes,EVENT_FILTERS, and newCATEGORY_TO_TAGmap kept (still used byPastEventCardandPastEventsSection)Type of change
Checklist
feature/,fix/,chore/,hotfix/)Linked Issues
Closes #
Addresses #
Related to #