Skip to content

Commit

Permalink
fix after-merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lendihop committed Dec 30, 2024
1 parent 412d5f2 commit 7efe4b8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/atoms/PageModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const PageModal: FC<PageModalProps> = ({
className={{
base: clsx(
LAYOUT_CONTAINER_CLASSNAME,
'h-full flex flex-col bg-white overflow-hidden outline-none',
'h-full flex flex-col bg-white overflow-hidden focus:outline-none',
fullPage ? 'rounded-lg' : 'rounded-t-lg',
ModStyles.base,
animated && 'ease-out duration-300'
Expand Down
8 changes: 4 additions & 4 deletions src/app/pages/Market/crypto-exchange/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { PageModalProps } from 'app/atoms/PageModal';
import { StoredExolixCurrency } from 'app/store/crypto-exchange/state';
import { t } from 'lib/i18n';

export const EXOLIX_CONTACT_LINK = 'https://exolix.com/contact';

Expand Down Expand Up @@ -44,10 +45,9 @@ export const INITIAL_EVM_ACC_OUTPUT_CURRENCY: StoredExolixCurrency = {
}
};

export type ModalHeaderConfig = Pick<PageModalProps, 'title' | 'shouldShowBackButton' | 'onGoBack'>;
export type ModalHeaderConfig = Pick<PageModalProps, 'title' | 'titleLeft'>;

export const defaultModalHeaderConfig: ModalHeaderConfig = {
title: 'Crypto Exchange',
shouldShowBackButton: undefined,
onGoBack: undefined
title: t('cryptoExchange'),
titleLeft: undefined
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ import {
} from 'app/store/crypto-exchange/selectors';
import { StoredExolixCurrency } from 'app/store/crypto-exchange/state';
import { SearchBarField } from 'app/templates/SearchField';
import { t } from 'lib/i18n';
import { isSearchStringApplicable, searchAndFilterItems } from 'lib/utils/search-items';
import { useAccountAddressForEvm, useAccountAddressForTezos, useEnabledEvmChains } from 'temple/front';

import { BackButton } from '../../../../../../atoms/PageModal';
import { CurrencyIcon } from '../../../components/CurrencyIcon';
import { ModalHeaderConfig, TEZOS_EXOLIX_NETWORK_CODE } from '../../../config';
import { getCurrencyDisplayCode, isSameExolixCurrency } from '../../../utils';
Expand Down Expand Up @@ -57,7 +59,10 @@ export const SelectCurrencyContent: FC<Props> = ({ content, setModalHeaderConfig
const inputCurrency = watch('inputCurrency');
const outputCurrency = watch('outputCurrency');

useLayoutEffect(() => void setModalHeaderConfig({ title: 'Select Token', shouldShowBackButton: true, onGoBack }), []);
useLayoutEffect(
() => void setModalHeaderConfig({ title: t('selectToken'), titleLeft: <BackButton onClick={onGoBack} /> }),
[]
);

const enabledExolixNetworkCodes = useMemo(
() => evmChains.map(({ chainId }) => exolixNetworksMap[chainId]),
Expand Down

0 comments on commit 7efe4b8

Please sign in to comment.