Skip to content

Commit

Permalink
chore(coinmarket): replaced old LayoutNavigation
Browse files Browse the repository at this point in the history
  • Loading branch information
adderpositive authored and tomasklim committed Oct 8, 2024
1 parent b0d3302 commit 544f334
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Translation, TrezorLink } from 'src/components/suite';
import { COINMARKET_DOWNLOAD_INVITY_APP_URL } from '@trezor/urls';
import { useSelector } from 'src/hooks/suite';
import { variables } from '@trezor/components/src/config';
import { CoinmarketLayout } from 'src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayout';
import { CoinmarketLayout } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayout';

const IconWrapper = styled.div`
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { UseCoinmarketProps } from 'src/types/coinmarket/coinmarket';
import { useCoinmarketBuyForm } from 'src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm';
import { CoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm';
import { CoinmarketFormLayout } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormLayout';
import { CoinmarketLayout } from 'src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayout';
import { CoinmarketLayout } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayout';

const CoinmarketBuyComponent = (props: UseCoinmarketProps) => {
const coinmarketBuyContextValues = useCoinmarketBuyForm(props);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { withSelectedAccountLoaded } from 'src/components/wallet';
import { useCoinmarketBuyForm } from 'src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm';
import { CoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm';
import { CoinmarketOffersContext } from 'src/hooks/wallet/coinmarket/offers/useCoinmarketCommonOffers';
import { UseCoinmarketProps } from 'src/types/coinmarket/coinmarket';
import { CoinmarketFooter } from 'src/views/wallet/coinmarket/common';
import { withCoinmarketLayoutWrap } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/withCoinmarketLayoutWrap';
Expand All @@ -12,11 +13,14 @@ const CoinmarketBuyOffersComponent = (props: UseCoinmarketProps) => {
pageType: 'offers',
});

// CoinmarketOffersContext.Provider is temporary FIX
return (
<CoinmarketFormContext.Provider value={coinmarketBuyFormContextValues}>
<CoinmarketOffers />
<CoinmarketFooter />
</CoinmarketFormContext.Provider>
<CoinmarketOffersContext.Provider value={coinmarketBuyFormContextValues}>
<CoinmarketFormContext.Provider value={coinmarketBuyFormContextValues}>
<CoinmarketOffers />
<CoinmarketFooter />
</CoinmarketFormContext.Provider>
</CoinmarketOffersContext.Provider>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { SelectedAccountLoaded } from '@suite-common/wallet-types';
import { CoinmarketFooter } from 'src/views/wallet/coinmarket/common';
import { spacingsPx } from '@trezor/theme';
import { SCREEN_QUERY } from '@trezor/components/src/config/variables';
import { CoinmarketLayoutNavigation } from 'src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation';
import { CoinmarketLayoutNavigation } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation';

const CoinmarketWrapper = styled.div`
padding: 0 ${spacingsPx.lg};
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import styled from 'styled-components';
import { useDevice, useSelector } from 'src/hooks/suite';
import { FirmwareType } from '@trezor/connect';
import { CoinmarketLayoutNavigationItem } from './CoinmarketLayoutNavigationItem';
import { Divider } from '@trezor/components';
import { spacings } from '@trezor/theme';
import regional from 'src/constants/wallet/coinmarket/regional';
import { getIsTorEnabled } from 'src/utils/suite/tor';
import { SelectedAccountLoaded } from '@suite-common/wallet-types';
import { CoinmarketLayoutNavigationItem } from 'src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayoutNavigation/CoinmarketLayoutNavigationItem';
import { hasBitcoinOnlyFirmware } from '@trezor/device-utils';
import { CoinmarketLayoutNavigationItem } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigationItem';

const List = styled.div`
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { UseCoinmarketProps } from 'src/types/coinmarket/coinmarket';
import { useCoinmarketExchangeForm } from 'src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm';
import { CoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm';
import { CoinmarketFormLayout } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormLayout';
import { CoinmarketLayout } from 'src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayout';
import { CoinmarketLayout } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayout';

const CoinmarketExchangeFormComponent = (props: UseCoinmarketProps) => {
const coinmarketExchangeContextValue = useCoinmarketExchangeForm(props);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { withSelectedAccountLoaded } from 'src/components/wallet';
import { UseCoinmarketProps } from 'src/types/coinmarket/coinmarket';
import { CoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm';
import { CoinmarketFormLayout } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormLayout';
import { CoinmarketLayout } from 'src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayout';
import { CoinmarketLayout } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayout';
import { useCoinmarketSellForm } from 'src/hooks/wallet/coinmarket/form/useCoinmarketSellForm';

const CoinmarketSellFormComponent = (props: UseCoinmarketProps) => {
Expand Down

0 comments on commit 544f334

Please sign in to comment.