diff --git a/pages/[p].tsx b/pages/[p].tsx index dd21b05cb3..6ae15e0b58 100644 --- a/pages/[p].tsx +++ b/pages/[p].tsx @@ -10,7 +10,6 @@ import GetProjectMeta from '../src/utils/getMetaTags/GetProjectMeta'; import { getAllPlantLocations } from '../src/utils/maps/plantLocations'; import i18next from '../i18n'; import { SingleProjectGeojson } from '../src/features/common/types/project'; -import { Treemapper } from '../src/features/user/TreeMapper/Treemapper'; const { useTranslation } = i18next; @@ -28,7 +27,7 @@ export default function Donate({ const router = useRouter(); const [internalCurrencyCode, setInternalCurrencyCode] = React.useState(''); const [internalLanguage, setInternalLanguage] = React.useState(''); - const [open, setOpen] = React.useState(false); + const [_open, setOpen] = React.useState(false); const { i18n } = useTranslation(); const { diff --git a/src/features/projects/components/ProjectSnippet.tsx b/src/features/projects/components/ProjectSnippet.tsx index 0a2c2bfd89..ebf8590b6f 100644 --- a/src/features/projects/components/ProjectSnippet.tsx +++ b/src/features/projects/components/ProjectSnippet.tsx @@ -32,8 +32,7 @@ export default function ProjectSnippet({ ? getImageUrl('project', 'medium', project.image) : ''; - const { selectedPl, hoveredPl, selectedSite } = - React.useContext(ProjectPropsContext); + const { selectedPl, hoveredPl } = React.useContext(ProjectPropsContext); let progressPercentage = (project.countPlanted / project.countTarget) * 100; diff --git a/src/features/user/GiftFunds/Details.tsx b/src/features/user/GiftFunds/Details.tsx index ff6eee6fdf..cd00110908 100644 --- a/src/features/user/GiftFunds/Details.tsx +++ b/src/features/user/GiftFunds/Details.tsx @@ -1,16 +1,15 @@ -import React, { useContext } from 'react'; +import React, { useContext, ReactElement } from 'react'; import { UserPropsContext } from '../../common/Layout/UserPropsContext'; import styles from './GiftFunds.module.scss'; import i18next from '../../../../i18n'; const { useTranslation } = i18next; -const Details = () => { +const Details = (): ReactElement | null => { const { user } = useContext(UserPropsContext); const { t, ready } = useTranslation('giftfunds'); - return ( - ready && - user.planetCash && ( + if (ready && user.planetCash) { + return (