]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/pages/Map.js
show map name in title/heading
[alttp.git] / resources / js / components / pages / Map.js
index d8a10393d12a0c70292ceb4307e682594c4c4569..8291ef2e982fc9a544fc8e4c6a4d4c51ad5b843c 100644 (file)
@@ -1,23 +1,38 @@
 import React from 'react';
 import { Container } from 'react-bootstrap';
+import { Helmet } from 'react-helmet';
 import { useTranslation } from 'react-i18next';
+import { useParams } from 'react-router';
 
+import CanonicalLinks from '../common/CanonicalLinks';
 import Buttons from '../map/Buttons';
+import List from '../map/List';
 import OpenSeadragon from '../map/OpenSeadragon';
 import Pins from '../map/Pins';
+import UWSuperTiles from '../map/UWSuperTiles';
 
 const Map = () => {
+       const [uwOverlay, setUWOverlay] = React.useState(false);
+
+       const { activeMap } = useParams();
        const container = React.useRef();
        const { t } = useTranslation();
 
        return <Container fluid>
+               <Helmet>
+                       <title>{t('map.heading')} - {t(`map.${activeMap}Long`)}</title>
+                       <meta name="description" content={t('map.description')} />
+               </Helmet>
+               <CanonicalLinks base={`/map/${activeMap}`} />
                <OpenSeadragon ref={container}>
-                       <div className="d-flex align-items-center justify-content-between">
-                               <h1>{t('map.heading')}</h1>
-                               <Buttons />
+                       <div className="d-flex align-items-start justify-content-between">
+                               <h1>{t('map.heading')} - {t(`map.${activeMap}Long`)}</h1>
+                               <Buttons setUWOverlay={setUWOverlay} uwOverlay={uwOverlay} />
                        </div>
                        <div ref={container} style={{ height: '80vh' }} />
                        <Pins />
+                       <UWSuperTiles show={uwOverlay} />
+                       <List />
                </OpenSeadragon>
        </Container>;
 };