fix(frontend): wrap catalog, disease detail, and expert reviews with MainLayout

- Add MainLayout wrapper to /catalog, /catalog/:slug, and /expert/reviews
  routes in app.tsx so they share the same navbar and footer as dashboard
- Remove duplicate header/layout/spacing from CatalogPage,
  DiseaseDetailPage, and ExpertReviewsPage
- Update ExpertReviewsPage to use consistent space-y layout pattern
  matching other pages
- Update CatalogPage to remove outer main wrapper since MainLayout
  provides the container

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Asep Haryana Saputra
2026-06-02 07:47:59 +00:00
co-authored by Claude Opus 4.7
parent 4d6ca4912c
commit 81d083a2b8
4 changed files with 344 additions and 357 deletions
+19 -3
View File
@@ -78,12 +78,28 @@ const router = createBrowserRouter([
path: "/expert/reviews",
element: (
<AuthGuard requireExpert>
<ExpertReviewsPage />
<MainLayout>
<ExpertReviewsPage />
</MainLayout>
</AuthGuard>
),
},
{ path: "/catalog", element: <CatalogPage /> },
{ path: "/catalog/:slug", element: <DiseaseDetailPage /> },
{
path: "/catalog",
element: (
<MainLayout>
<CatalogPage />
</MainLayout>
),
},
{
path: "/catalog/:slug",
element: (
<MainLayout>
<DiseaseDetailPage />
</MainLayout>
),
},
]);
export function App() {