import classNames from 'classnames' import { useLocation } from 'react-router-dom' import AccountDetails from 'components/Account/AccountDetails' import Background from 'components/Background' import Footer from 'components/Footer' import DesktopHeader from 'components/Header/DesktopHeader' import ModalsContainer from 'components/Modals/ModalsContainer' import PageMetadata from 'components/PageMetadata' import TermsOfService from 'components/TermsOfService' import Toaster from 'components/Toaster' import useStore from 'store' export default function Layout({ children }: { children: React.ReactNode }) { const location = useLocation() const showTermsOfService = useStore((s) => s.showTermsOfService) const isFullWidth = location.pathname.includes('trade') || location.pathname === '/' return ( <>
{showTermsOfService ? : children}