Bug Description
The frontend fails to build/run due to a JSX syntax error.
Error
X [ERROR] Expected ")" but found "variant"
src/components/admin/AdminHome.jsx:133:10
Root Cause
In frontend/src/components/admin/AdminHome.jsx, the <nav> containing the dashboard tab buttons (Users / Payments / Activity Logs) is malformed. The "Activity Logs" button is missing its opening <Button tag, and appears to have been merged incorrectly with a second, duplicate <nav> block. This also splits what should be a single three-way conditional (payments / activity-logs / default users) into two separate, broken conditional blocks:
{activeSection === "payments" ? (
<PaymentRecords />
variant={
activeSection === "activity-logs" ? "contained" : "outlined"
}
...
</Button>
</nav>
{activeSection === "activity-logs" ? (
<ActivityLogs />
) : (
<section ...>
Proposed Fix
Merge into a single <nav> with all three buttons properly opened/closed, and combine the conditionals into one clean three-way check:
<nav aria-label="Admin dashboard sections" style={{ ... }}>
<Button variant={activeSection === "users" ? "contained" : "outlined"} ... >Users</Button>
<Button variant={activeSection === "payments" ? "contained" : "outlined"} ... >Payments</Button>
<Button variant={activeSection === "activity-logs" ? "contained" : "outlined"} ... >Activity Logs</Button>
</nav>
{activeSection === "payments" ? (
<PaymentRecords />
) : activeSection === "activity-logs" ? (
<ActivityLogs />
) : (
<section ...>
...
Confirmed the frontend builds and runs cleanly after this fix. Happy to open a PR if assigned.
Bug Description
The frontend fails to build/run due to a JSX syntax error.
Error
X [ERROR] Expected ")" but found "variant"
src/components/admin/AdminHome.jsx:133:10
Root Cause
In
frontend/src/components/admin/AdminHome.jsx, the<nav>containing the dashboard tab buttons (Users / Payments / Activity Logs) is malformed. The "Activity Logs" button is missing its opening<Buttontag, and appears to have been merged incorrectly with a second, duplicate<nav>block. This also splits what should be a single three-way conditional (payments/activity-logs/ defaultusers) into two separate, broken conditional blocks:Proposed Fix
Merge into a single
<nav>with all three buttons properly opened/closed, and combine the conditionals into one clean three-way check:Confirmed the frontend builds and runs cleanly after this fix. Happy to open a PR if assigned.