From 62e326a1f19b68bbda02debcb0bf61f8e9441a4d Mon Sep 17 00:00:00 2001 From: Viet Nguyen <3805254+vnugent@users.noreply.github.com> Date: Thu, 31 Oct 2024 22:47:46 -0700 Subject: [PATCH] Migrate climb page to Next 13 structure (#1195) * migrate climb page to next13 structure * resolve to /climb page globally * add map link to main nav --- src/app/(default)/about/components/About.tsx | 2 +- .../(default)/area/[[...slug]]/loading.tsx | 4 +- src/app/(default)/area/[[...slug]]/page.tsx | 39 ++----- .../[[...slug]]/components/ClimbData.tsx | 66 +++++++++++ .../[[...slug]]/components/ContentBlock.tsx | 26 +++++ .../[[...slug]]/components/PageAlert.tsx | 12 ++ .../[[...slug]]/components/SiblingClimbs.tsx | 29 +++++ src/app/(default)/climb/[[...slug]]/page.tsx | 107 ++++++++++++++++++ .../components/AreaAndClimbPageActions.tsx | 47 ++++++++ .../(default)/components/AreaPageActions.tsx | 27 ----- .../(default)/components/DesktopHeader.tsx | 7 +- src/app/(default)/components/LandingHero.tsx | 12 -- ...aLinkButton.tsx => SharePageURLButton.tsx} | 10 +- ...Container.tsx => DefaultPageContainer.tsx} | 27 +++-- .../components/climb/ClimbListForm.tsx | 4 +- src/components/crag/ClimbListPreview.tsx | 2 +- src/components/crag/NeighboringRoute.tsx | 33 +++--- src/components/edit/RecentChangeHistory.tsx | 10 +- src/components/media/PhotoUploadButtons.tsx | 4 +- src/components/media/Tag.tsx | 2 +- src/components/media/__tests__/Tag.tsx | 2 +- src/components/search/ResultTemplates.tsx | 2 +- .../sources/TypesenseXSearchSources.tsx | 2 +- .../search/templates/ClimbResultXSearch.tsx | 2 +- src/js/graphql/api.ts | 6 +- src/js/graphql/gql/climbById.ts | 23 ++++ src/js/types/pages.ts | 7 ++ src/js/utils.ts | 33 +++++- src/pages/sitemap.xml.tsx | 42 +++---- src/pages/u2/[...slug].tsx | 2 +- 30 files changed, 441 insertions(+), 150 deletions(-) create mode 100644 src/app/(default)/climb/[[...slug]]/components/ClimbData.tsx create mode 100644 src/app/(default)/climb/[[...slug]]/components/ContentBlock.tsx create mode 100644 src/app/(default)/climb/[[...slug]]/components/PageAlert.tsx create mode 100644 src/app/(default)/climb/[[...slug]]/components/SiblingClimbs.tsx create mode 100644 src/app/(default)/climb/[[...slug]]/page.tsx create mode 100644 src/app/(default)/components/AreaAndClimbPageActions.tsx delete mode 100644 src/app/(default)/components/AreaPageActions.tsx rename src/app/(default)/components/{ShareAreaLinkButton.tsx => SharePageURLButton.tsx} (74%) rename src/app/(default)/components/ui/{AreaPageContainer.tsx => DefaultPageContainer.tsx} (59%) create mode 100644 src/js/types/pages.ts diff --git a/src/app/(default)/about/components/About.tsx b/src/app/(default)/about/components/About.tsx index 68593ef95..91954a985 100644 --- a/src/app/(default)/about/components/About.tsx +++ b/src/app/(default)/about/components/About.tsx @@ -62,7 +62,7 @@ export function About (): ReactNode { width={700} />