The E-Board & Faculty page (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/asubap/website/llms.txt
Use this file to discover all available pages before exploring further.
/eboard-faculty) presents every executive board role and faculty advisor associated with the Beta Tau Chapter in a responsive card grid. The page is fully public — no authentication is required to view it — and is accessible from the primary navigation bar. To minimize redundant API calls while keeping data reasonably fresh, the component implements a short-lived localStorage cache: entries fetched from GET /eboard are stored in localStorage under the key "eboard_faculty_cache" alongside a timestamp, and the cached payload is reused for up to 6 seconds (CACHE_DURATION = 6000 ms) before the API is re-queried.
Data Fetching & Caching
Read localStorage
Retrieves the JSON string stored at
"eboard_faculty_cache". If the entry exists and its timestamp is less than 6 seconds old, the cached data array is applied directly to state and the API call is skipped.Fetch from API (if cache is stale or absent)
Authorization header is sent — the /eboard endpoint is public.EboardFacultyEntry Type
display_email takes precedence over role_email which takes precedence over email when rendering the clickable email button. Clicking the email copies it to the clipboard via navigator.clipboard.writeText() and triggers a success toast.Card Grid & Sort Order
Entries are sorted ascending byrank before rendering, with unranked entries (rank === undefined) pushed to the end using 9999 as a fallback sort key:
| Breakpoint | Columns |
|---|---|
| Mobile (default) | 1 |
Tablet (sm) | 2 |
Desktop (lg) | 3 |
Card Content
Each entry card is a whiteshadow-xl rounded tile (p-6) with centered content:
Profile Photo
Rendered as a
w-32 h-32 circular image (rounded-full object-cover) when profile_photo_url is present. If the field is absent the photo section is omitted entirely.Name
Displays
entry.name or a hyphen ("-") if name is null. This handles in-progress board transitions where a seat is defined but not yet filled.Role
Displayed in maroon (
text-bapred) below the name. This is the primary identifier for the card.Major
Displayed in muted gray (
text-bapgray text-sm) below the role. Empty string if major is null.Email Copy Button
If any ofdisplay_email, role_email, or email is present, a clickable <button> renders the address in maroon with an underline on hover. Clicking it:
- Calls
navigator.clipboard.writeText(...)with the resolved email. - Fires
showToast("Role email copied to clipboard!", "success")from theToastContext.