From 9c87759784f9dccc1206147dd4a2873598aa0c18 Mon Sep 17 00:00:00 2001 From: Nick Date: Sun, 8 Sep 2024 10:58:28 +0330 Subject: [PATCH] refactor: remove no ts directives --- .../fullscreen/homeFullScreen/partials/Currency.tsx | 10 +++++++--- packages/extension-polkagate/src/hooks/useCurrency.ts | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/Currency.tsx b/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/Currency.tsx index 57a9ce812..af47a4040 100644 --- a/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/Currency.tsx +++ b/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/Currency.tsx @@ -1,6 +1,5 @@ // Copyright 2019-2024 @polkadot/extension-polkagate authors & contributors // SPDX-License-Identifier: Apache-2.0 -// @ts-nocheck /* eslint-disable react/jsx-max-props-per-line */ @@ -10,9 +9,14 @@ import React, { useCallback, useLayoutEffect, useMemo, useState } from 'react'; import { getStorage } from '../../../components/Loading'; import CurrencySwitch from '../components/CurrencySwitch'; -export interface CurrencyItemType { code: string; country: string; currency: string; sign: string; } +export interface CurrencyItemType { + code: string; + country: string; + currency: string; + sign: string; +} -export default function Currency(): React.ReactElement { +export default function Currency (): React.ReactElement { const theme = useTheme(); const [anchorEl, setAnchorEl] = useState(null); const [currencyToShow, setCurrencyToShow] = useState(); diff --git a/packages/extension-polkagate/src/hooks/useCurrency.ts b/packages/extension-polkagate/src/hooks/useCurrency.ts index 1ad5e2862..9cc256bd7 100644 --- a/packages/extension-polkagate/src/hooks/useCurrency.ts +++ b/packages/extension-polkagate/src/hooks/useCurrency.ts @@ -1,12 +1,12 @@ // Copyright 2019-2024 @polkadot/extension-polkagate authors & contributors // SPDX-License-Identifier: Apache-2.0 -// @ts-nocheck + +import type { CurrencyItemType } from '../fullscreen/homeFullScreen/partials/Currency'; import { useContext, useEffect } from 'react'; import { CurrencyContext } from '../components'; import { getStorage, watchStorage } from '../components/Loading'; -import { CurrencyItemType } from '../fullscreen/homeFullScreen/partials/Currency'; import { USD_CURRENCY } from '../util/constants'; /** @@ -14,7 +14,7 @@ import { USD_CURRENCY } from '../util/constants'; * get the selected currency * @returns CurrencyItemType */ -export default function useCurrency(): CurrencyItemType | undefined { +export default function useCurrency (): CurrencyItemType | undefined { const { currency, setCurrency } = useContext(CurrencyContext); useEffect(() => {