diff --git a/src/components/bars/top/buttons/swap.js b/src/components/bars/top/buttons/swap.js index e714b986..bd953d29 100644 --- a/src/components/bars/top/buttons/swap.js +++ b/src/components/bars/top/buttons/swap.js @@ -16,14 +16,14 @@ const intlMessages = defineMessages({ }, }); -const propTypes = { toggleSwap: PropTypes.func }; +const propTypes = { toggleSwap: PropTypes.func, hidePresentation: PropTypes.bool }; -const defaultProps = { toggleSwap: () => {} }; +const defaultProps = { toggleSwap: () => { }, hidePresentation: false }; -const Swap = ({ toggleSwap }) => { +const Swap = ({ toggleSwap, hidePresentation }) => { const intl = useIntl(); - if (!layout.control || !config.swap || layout.single) return null; + if (!layout.control || !config.swap || layout.single || hidePresentation) return null; return (