diff --git a/src/app/area/[[...slug]]/page.tsx b/src/app/area/[[...slug]]/page.tsx index 3a99f38f1..cd7a5c987 100644 --- a/src/app/area/[[...slug]]/page.tsx +++ b/src/app/area/[[...slug]]/page.tsx @@ -123,8 +123,11 @@ export default async function Page ({ params }: PageWithCatchAllUuidProps): Prom - - + {/* An area can only have either subareas or climbs, but not both. */} +
+ + +
) } diff --git a/src/app/area/[[...slug]]/sections/ClimbListSection.tsx b/src/app/area/[[...slug]]/sections/ClimbListSection.tsx index b3a1cc15b..94b09572b 100644 --- a/src/app/area/[[...slug]]/sections/ClimbListSection.tsx +++ b/src/app/area/[[...slug]]/sections/ClimbListSection.tsx @@ -1,30 +1,30 @@ -import Link from 'next/link' import { Plus } from '@phosphor-icons/react/dist/ssr' import { ClimbList } from '@/app/editArea/[slug]/general/components/climb/ClimbListForm' import { AreaType } from '@/js/types' /** - * Sub-areas section + * Climb list section */ -export const ClimbListSection: React.FC<{ area: AreaType }> = ({ area }) => { +export const ClimbListSection: React.FC<{ area: AreaType, editMode?: boolean }> = ({ area, editMode = false }) => { const { uuid, gradeContext, climbs, metadata } = area if (!metadata.leaf) return null return ( -
+

{climbs.length} Climbs

-
- Coming soon: - - New Climbs - -
+ {/* Already in the edit dashboard. Don't show the button */} + {!editMode && + }
-
+
- +
) } diff --git a/src/app/area/[[...slug]]/sections/SubAreasSection.tsx b/src/app/area/[[...slug]]/sections/SubAreasSection.tsx index c862fd370..e6d795bb0 100644 --- a/src/app/area/[[...slug]]/sections/SubAreasSection.tsx +++ b/src/app/area/[[...slug]]/sections/SubAreasSection.tsx @@ -11,7 +11,7 @@ export const SubAreasSection: React.FC<{ area: AreaType } > = ({ area }) => { const { uuid, children, metadata: { leaf } } = area if (leaf) return null return ( -
+

{children.length} Areas

@@ -21,7 +21,7 @@ export const SubAreasSection: React.FC<{ area: AreaType } > = ({ area }) => {
-
+
diff --git a/src/app/editArea/[slug]/SidebarNav.tsx b/src/app/editArea/[slug]/SidebarNav.tsx index 9622d5ba1..cc606e8ce 100644 --- a/src/app/editArea/[slug]/SidebarNav.tsx +++ b/src/app/editArea/[slug]/SidebarNav.tsx @@ -1,8 +1,7 @@ 'use client' -import Link from 'next/link' import clx from 'classnames' import { usePathname } from 'next/navigation' -import { Article, Plus } from '@phosphor-icons/react/dist/ssr' +import { Article, Plus, LineSegments } from '@phosphor-icons/react/dist/ssr' /** * Sidebar navigation for area edit @@ -12,32 +11,47 @@ export const SidebarNav: React.FC<{ slug: string, canAddAreas: boolean, canAddCl /** * Disable menu item's hover/click when own page is showing */ - const classForActivePage = (myPath: string): string => activePath.endsWith(myPath) ? 'font-semibold pointer-events-none' : '' + const classForActivePage = (myPath: string): string => activePath.endsWith(myPath) ? 'font-bold pointer-events-none' : 'font-base' return (