Skip to content

feat: added about us api integration - #96

Open
jenniferhuangg wants to merge 4 commits into
legacyfrom
feat/about-us-api-integration
Open

feat: added about us api integration#96
jenniferhuangg wants to merge 4 commits into
legacyfrom
feat/about-us-api-integration

Conversation

@jenniferhuangg

Copy link
Copy Markdown
Member

Description

Type of Change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation update
  • Style / UI change
  • Configuration change

Changes Made

  • Added Supabase Exec table API integration for About Us page
  • Members show up dynamically and show up under a team, grouped by index
  • Has default photo if no photo for exec added
  • Edited text size to fit photo margins
  • Works on different screen sizes

Screenshots / Recordings

image image

Testing

  • Tested locally
  • Verified on mobile / responsive views
  • Added or updated tests

Checklist

  • Code follows the project's style guidelines
  • No new warnings or errors in the console
  • Related documentation has been updated (if applicable)
  • PR title follows conventional format (e.g., feat:, fix:, refactor:)

Related Issues

Additional Notes

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread frontend/components/ExecutiveSection.jsx Outdated
Comment thread frontend/components/ExecutiveSection.jsx Outdated
Comment thread frontend/components/ExecutiveSection.jsx Outdated
Comment thread frontend/components/ExecutiveSection.jsx Outdated
Comment thread frontend/components/FlipCard.jsx
Comment thread frontend/components/FlipCard.jsx Outdated
Comment thread frontend/components/ExecutiveSection.jsx Outdated
@kr1shap

kr1shap commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

The ordering is wrong, can we fix this? There is many more but I can't attach all.

image image image

Comment thread frontend/components/FlipCard.jsx Outdated
Comment thread frontend/next.config.ts Outdated
remotePatterns: [
{
protocol: "https",
hostname: "uhugvwdetrwvhhrsyvoz.supabase.co",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tjhiaj is it fine to have the hostname of our project URL public? This is for Nextjs to render our images from our bucket

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/execs route handler to proxy Supabase Edge Function exec responses.
  • Refactored ExecutiveSection to fetch execs dynamically and group members by configured order_index ranges 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.

Comment thread frontend/components/ExecutiveSection.jsx Outdated
Comment thread frontend/components/ExecutiveSection.jsx Outdated
Comment thread frontend/next.config.ts Outdated
Comment on lines 7 to +9
const navItems = [
{ href: "/", label: "HOME" },
{ href: "/about", label: "ABOUT" },
{ href: "/aboutus", label: "ABOUT" },
Comment thread frontend/app/api/execs/route.js Outdated
Comment on lines +1 to +21

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}`,
},
});
Comment thread frontend/app/api/execs/route.js Outdated
@kr1shap

kr1shap commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

Ditto comments,

For the hostname URL under next config (whatever the file is), use this


import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  images: {
    remotePatterns: [
      {
        protocol: "https",
        hostname: "uhugvwdetrwvhhrsyvoz.supabase.co",
        pathname: "/storage/v1/object/public/event-images/**",
      },
    ],
  },
};

export default nextConfig;

Other comments left by copilot, take a look and see if there is anything that shoould be changed from that.

@jenniferhuangg

Copy link
Copy Markdown
Member Author
image image I fixed the pr comments, here is a visual of layout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants