Skip to content

Commit

Permalink
fix: webview header in modal (#2599)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnylqm authored Feb 21, 2023
1 parent 1b55e25 commit 084979a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
17 changes: 6 additions & 11 deletions packages/kit/src/hooks/useOpenBlockBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useCallback, useMemo } from 'react';

import { useIntl } from 'react-intl';

import { useIsVerticalLayout } from '@onekeyhq/components';
import type { Network } from '@onekeyhq/engine/src/types/network';
import { IMPL_FIL } from '@onekeyhq/shared/src/engine/engineConsts';
import platformEnv from '@onekeyhq/shared/src/platformEnv';
Expand Down Expand Up @@ -64,10 +63,6 @@ export default function useOpenBlockBrowser(

const networks = useNetworks();

const isVertical = useIsVerticalLayout();

const modalMode = !isVertical;

const hasAvailable = useMemo(() => {
if (!network) return false;
const currentNetwork = networks.find((x) => x.id === network.id);
Expand All @@ -82,11 +77,11 @@ export default function useOpenBlockBrowser(
url,
title ?? intl.formatMessage({ id: 'transaction__transaction_details' }),
{
modalMode,
modalMode: true,
},
);
},
[intl, modalMode, network],
[intl, network],
);

const openAddressDetails = useCallback(
Expand All @@ -97,11 +92,11 @@ export default function useOpenBlockBrowser(
url,
title ?? intl.formatMessage({ id: 'transaction__transaction_details' }),
{
modalMode,
modalMode: true,
},
);
},
[intl, modalMode, network],
[intl, network],
);

const openBlockDetails = useCallback(
Expand All @@ -112,11 +107,11 @@ export default function useOpenBlockBrowser(
url,
title ?? intl.formatMessage({ id: 'transaction__transaction_details' }),
{
modalMode,
modalMode: true,
},
);
},
[intl, modalMode, network],
[intl, network],
);

return {
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/views/Wallet/AssetsList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from '@onekeyhq/components';
import { Tabs } from '@onekeyhq/components/src/CollapsibleTabView';
import type { FlatListProps } from '@onekeyhq/components/src/FlatList';
import type { Token } from '@onekeyhq/engine/src/types/token';
import type { EVMDecodedItem } from '@onekeyhq/engine/src/vaults/impl/evm/decoder/types';
import { EVMDecodedTxType } from '@onekeyhq/engine/src/vaults/impl/evm/decoder/types';
import { HomeRoutes } from '@onekeyhq/kit/src/routes/types';
Expand All @@ -34,7 +35,6 @@ import TokenCell from './TokenCell';

import type { SimplifiedToken } from '../../../store/reducers/tokens';
import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { Token } from '@onekeyhq/engine/src/types/token';

type NavigationProps = NativeStackNavigationProp<
RootRoutesParams,
Expand Down

0 comments on commit 084979a

Please sign in to comment.