Skip to content

Commit

Permalink
feat: add profile link
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber committed Nov 28, 2023
1 parent 75a60b9 commit b13bb54
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/landscape/components/LandscapeMapEmbed.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,28 @@ import { useSelector } from 'react-redux';
import { useFetchData } from 'terraso-client-shared/store/utils';
import { Typography } from '@mui/material';

import ExternalLink from 'common/components/ExternalLink';
import { useDocumentTitle } from 'common/document';
import PageLoader from 'layout/PageLoader';
import { fetchLandscapes } from 'landscape/landscapeSlice';

import LandscapeListMap from './LandscapeListMap';

const LandscapeDescriptionPopup = ({ landscape }) => (
<>
<Typography variant="h2">{landscape.data.name}</Typography>
<Typography variant="body2">{landscape.data.description}</Typography>
</>
);
const LandscapeDescriptionPopup = ({ landscape }) => {
const { t } = useTranslation();

return (
<>
<Typography variant="h2">{landscape.data.name}</Typography>
<Typography variant="body2">{landscape.data.description}</Typography>
<Typography variant="body2">
<ExternalLink href={`/landscapes/${landscape.data.slug}/profile`}>
{t('landscape.map_profile_link_text')}
</ExternalLink>
</Typography>
</>
);
};

const LandscapeMapEmbed = () => {
const { t } = useTranslation();
Expand Down

0 comments on commit b13bb54

Please sign in to comment.