X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fmap%2FPin.js;h=9d9b471430e5c21602725ca5e1264cd813358361;hb=13ffde5b2abcf831af9c794044350737066c5933;hp=442e16d638675ba8574bf46316e158fa003da2b9;hpb=f0ca8caa3db00bedbf2b992d3d72b401bf353689;p=alttp.git diff --git a/resources/js/components/map/Pin.js b/resources/js/components/map/Pin.js index 442e16d..9d9b471 100644 --- a/resources/js/components/map/Pin.js +++ b/resources/js/components/map/Pin.js @@ -6,6 +6,7 @@ import { useOpenSeadragon } from './OpenSeadragon'; import Overlay from './Overlay'; import Popover from './Popover'; import Icon from '../common/Icon'; +import ZeldaIcon from '../common/ZeldaIcon'; import { getLink, getTranslation } from '../../helpers/Technique'; import i18n from '../../i18n'; @@ -32,10 +33,18 @@ const Pin = ({ pin }) => { } }, [pin]); + const title = React.useMemo(() => { + return getTranslation(pin.technique, 'title', i18n.language); + }, [pin, i18n.language]); + return
- + {pin.marker ? + + : + + } {pin.technique.type === 'location' ?
@@ -48,6 +57,7 @@ const Pin = ({ pin }) => { Pin.propTypes = { pin: PropTypes.shape({ + marker: PropTypes.string, technique: PropTypes.shape({ type: PropTypes.string, }),