Skip to content

Commit

Permalink
refactor: remove no ts directives
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-1979 committed Sep 8, 2024
1 parent fec2f93 commit 9c87759
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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 */

Expand All @@ -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<HTMLButtonElement | null>(null);
const [currencyToShow, setCurrencyToShow] = useState<string | undefined>();
Expand Down
6 changes: 3 additions & 3 deletions packages/extension-polkagate/src/hooks/useCurrency.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// 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';

/**
* @description
* get the selected currency
* @returns CurrencyItemType
*/
export default function useCurrency(): CurrencyItemType | undefined {
export default function useCurrency (): CurrencyItemType | undefined {
const { currency, setCurrency } = useContext(CurrencyContext);

useEffect(() => {
Expand Down

0 comments on commit 9c87759

Please sign in to comment.