diff --git a/package.json b/package.json index b743990c2..c072936c3 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "react-hotkeys-hook": "^3.4.7", "react-infinite-scroll-component": "^6.1.0", "react-map-gl": "^7.0.10", + "react-markdown": "^9.0.1", "react-paginate": "^8.1.3", "react-responsive": "^9.0.0-beta.6", "react-swipeable": "^7.0.0", diff --git a/src/app/area/[...slug]/page.tsx b/src/app/area/[...slug]/page.tsx index 776fcfe50..5eb30a0b9 100644 --- a/src/app/area/[...slug]/page.tsx +++ b/src/app/area/[...slug]/page.tsx @@ -1,13 +1,18 @@ import { notFound, redirect } from 'next/navigation' import slugify from 'slugify' import { validate } from 'uuid' +import { MapPinLine } from '@phosphor-icons/react/dist/ssr' +import 'mapbox-gl/dist/mapbox-gl.css' +import Markdown from 'react-markdown' import PhotoMontage from '@/components/media/PhotoMontage' import { getArea } from '@/js/graphql/getArea' import { StickyHeaderContainer } from '@/app/components/ui/StickyHeaderContainer' - -import BreadCrumbs from '@/components/ui/BreadCrumbs' - +import { GluttenFreeCrumbs } from '@/components/ui/BreadCrumbs' +import { ArticleLastUpdate } from '@/components/edit/ArticleLastUpdate' +import { getMapHref } from '@/js/utils' +import AreaMap from '@/components/area/areaMap' +import { PageContainer } from '@/app/components/ui/PageContainer' /** * Cache duration in seconds */ @@ -31,8 +36,9 @@ export default async function Page ({ params }: PageWithCatchAllUuidProps): Prom const { area } = pageData const photoList = area?.media ?? [] - const { uuid, pathTokens, ancestors, areaName, content } = area + const { uuid, pathTokens, ancestors, areaName, content, authorMetadata, metadata } = area const { description } = content + const { lat, lng } = metadata const friendlySlug = slugify(areaName, { lower: true, strict: true }).substring(0, 50) @@ -41,47 +47,53 @@ export default async function Page ({ params }: PageWithCatchAllUuidProps): Prom } return ( -
+ + } + > - +
-

{areaName}

- - {/* { - latlngPair != null && ( -

Description

-
{description}
+ {description}
- - {/* {JSON.stringify(pageData.area, null, 2)} */} -
+ ) } diff --git a/src/app/components/PageFooter.tsx b/src/app/components/PageFooter.tsx index 98e540854..1a60d8a06 100644 --- a/src/app/components/PageFooter.tsx +++ b/src/app/components/PageFooter.tsx @@ -4,7 +4,7 @@ import { Logo, LogoSize } from 'app/header' */ export const PageFooter: React.FC = () => { return ( -