Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pages/[p].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If _open is not being used then it can be removed


const { i18n } = useTranslation();
const {
Expand Down
3 changes: 1 addition & 2 deletions src/features/projects/components/ProjectSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
15 changes: 8 additions & 7 deletions src/features/user/GiftFunds/Details.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className={styles.allGiftFundscontainer}>
{user.planetCash.giftFunds
.filter((gift) => gift.openUnits !== 0)
Expand Down Expand Up @@ -38,8 +37,10 @@ const Details = () => {
</div>
))}
</div>
)
);
);
}

return null;
};

export default Details;
2 changes: 1 addition & 1 deletion src/features/user/TreeMapper/Treemapper.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export declare namespace Treemapper {
declare namespace Treemapper {
export interface DeviceLocation {
coordinates: number[];
type: string;
Expand Down