From 840959caa3362698fee41ce24cb6948e80f61e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateo=20Guzm=C3=A1n?= <20783123+mateoguzmana@users.noreply.github.com> Date: Thu, 29 Jun 2023 18:56:31 +0200 Subject: [PATCH] fix(types): adding correct unsubscribed component props (#50811) Co-authored-by: Muhammed Mustafa --- client/src/client-only-routes/show-unsubscribed.tsx | 9 ++++++--- client/src/pages/unsubscribed.tsx | 5 +---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/client/src/client-only-routes/show-unsubscribed.tsx b/client/src/client-only-routes/show-unsubscribed.tsx index fc701d47ebf..321a734ab94 100644 --- a/client/src/client-only-routes/show-unsubscribed.tsx +++ b/client/src/client-only-routes/show-unsubscribed.tsx @@ -1,4 +1,5 @@ import { Grid, Panel, Button } from '@freecodecamp/react-bootstrap'; +import type { RouteComponentProps } from '@reach/router'; import React from 'react'; import Helmet from 'react-helmet'; import { useTranslation } from 'react-i18next'; @@ -9,11 +10,13 @@ import FullWidthRow from '../components/helpers/full-width-row'; const { apiLocation } = envData; +type ShowUnsubscribedProps = Pick & { + unsubscribeId?: string; +}; + function ShowUnsubscribed({ unsubscribeId -}: { - unsubscribeId: string; -}): JSX.Element { +}: ShowUnsubscribedProps): JSX.Element { const { t } = useTranslation(); return ( <> diff --git a/client/src/pages/unsubscribed.tsx b/client/src/pages/unsubscribed.tsx index 8ed76294e92..a72180e03d8 100644 --- a/client/src/pages/unsubscribed.tsx +++ b/client/src/pages/unsubscribed.tsx @@ -8,11 +8,8 @@ import RedirectHome from '../components/redirect-home'; function Unsubscribed(): JSX.Element { return ( - {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */} - {/* @ts-ignore */} - {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */} - {/* @ts-ignore */} +