feat: added about us api integration - #96
Conversation
There was a problem hiding this comment.
Pull request overview
Adds dynamic Executive Team rendering on the About page by fetching exec member data from a Supabase Edge Function, along with UI updates to support remote profile images and a default placeholder when images are missing.
Changes:
- Fetch exec team data from Supabase and render team sections dynamically.
- Add a default “person” placeholder when an exec member has no image.
- Allow Next Image optimization for images hosted on the project’s Supabase domain.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| frontend/next.config.ts | Allows next/image to load/optimize images from the Supabase project domain. |
| frontend/components/FlipCard.jsx | Adds a placeholder graphic for missing images; adjusts name/role text layout. |
| frontend/components/ExecutiveSection.jsx | Replaces hardcoded exec data with a client-side fetch + dynamic grouping/rendering. |
| remotePatterns: [ | ||
| { | ||
| protocol: "https", | ||
| hostname: "uhugvwdetrwvhhrsyvoz.supabase.co", |
There was a problem hiding this comment.
@tjhiaj is it fine to have the hostname of our project URL public? This is for Nextjs to render our images from our bucket
There was a problem hiding this comment.
Pull request overview
Adds dynamic “About Us / Executive Team” data loading by proxying Supabase Exec table data through a Next.js API route and rendering members in grouped sections on the About Us page.
Changes:
- Added
/api/execsroute handler to proxy Supabase Edge Functionexecresponses. - Refactored
ExecutiveSectionto fetch execs dynamically and group members by configuredorder_indexranges and role buckets. - Updated UI components to support missing photos (placeholder) and added Supabase image host allowlist for
next/image.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/next.config.ts | Allows next/image to load remote images from the Supabase project domain. |
| frontend/components/PersonPlaceholder.jsx | Adds a default placeholder graphic for exec cards with no photo. |
| frontend/components/Navbar.tsx | Updates the About nav link to the /aboutus route. |
| frontend/components/FlipCard.jsx | Uses the placeholder when imageUrl is missing; tweaks image sizing and text layout. |
| frontend/components/ExecutiveSection.jsx | Fetches exec data from /api/execs, groups it into sections, and renders role-based rows. |
| frontend/app/api/execs/route.js | Introduces a Next.js API proxy to call the Supabase exec Edge Function. |
| const navItems = [ | ||
| { href: "/", label: "HOME" }, | ||
| { href: "/about", label: "ABOUT" }, | ||
| { href: "/aboutus", label: "ABOUT" }, |
|
|
||
| export async function GET() { | ||
| const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL; | ||
| const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY; | ||
|
|
||
| if (!supabaseUrl || !supabaseAnonKey) { | ||
| return Response.json( | ||
| { | ||
| error: | ||
| "Server misconfiguration: NEXT_PUBLIC_SUPABASE_URL and/or " + | ||
| "NEXT_PUBLIC_SUPABASE_ANON_KEY are not set.", | ||
| }, | ||
| { status: 500 } | ||
| ); | ||
| } | ||
|
|
||
| const res = await fetch(`${supabaseUrl}/functions/v1/exec`, { | ||
| headers: { | ||
| Authorization: `Bearer ${supabaseAnonKey}`, | ||
| }, | ||
| }); |
|
Ditto comments, For the hostname URL under next config (whatever the file is), use this Other comments left by copilot, take a look and see if there is anything that shoould be changed from that. |





Description
Type of Change
Changes Made
Screenshots / Recordings
Testing
Checklist
feat:,fix:,refactor:)Related Issues
Additional Notes