2022-10-30 22:00:21 -07:00
|
|
|
import SwapForm from './SwapForm'
|
2022-12-20 01:13:24 -08:00
|
|
|
// import mangoStore from '@store/mangoStore'
|
|
|
|
// import SwapOnboardingTour from '@components/tours/SwapOnboardingTour'
|
|
|
|
// import { useWallet } from '@solana/wallet-adapter-react'
|
2022-10-06 20:16:11 -07:00
|
|
|
import SwapInfoTabs from './SwapInfoTabs'
|
2022-10-10 14:15:35 -07:00
|
|
|
import dynamic from 'next/dynamic'
|
2023-03-02 09:02:26 -08:00
|
|
|
import SwapIntroModal from '@components/modals/SwapIntroModal'
|
|
|
|
import { useLocalStorage } from '@solana/wallet-adapter-react'
|
|
|
|
import { SHOW_SWAP_INTRO_MODAL } from 'utils/constants'
|
2022-12-20 01:13:24 -08:00
|
|
|
// import useLocalStorageState from 'hooks/useLocalStorageState'
|
|
|
|
// import { IS_ONBOARDED_KEY } from 'utils/constants'
|
2022-10-10 14:15:35 -07:00
|
|
|
const SwapTokenChart = dynamic(() => import('./SwapTokenChart'), { ssr: false })
|
2022-05-31 18:41:18 -07:00
|
|
|
|
2022-09-14 18:06:00 -07:00
|
|
|
const SwapPage = () => {
|
2023-03-02 09:02:26 -08:00
|
|
|
const [showSwapIntro, setShowSwapIntro] = useLocalStorage(
|
|
|
|
SHOW_SWAP_INTRO_MODAL,
|
|
|
|
true
|
|
|
|
)
|
2022-12-20 01:13:24 -08:00
|
|
|
// const { connected } = useWallet()
|
|
|
|
// const tourSettings = mangoStore((s) => s.settings.tours)
|
|
|
|
// const [isOnboarded] = useLocalStorageState(IS_ONBOARDED_KEY)
|
2022-05-31 18:41:18 -07:00
|
|
|
|
|
|
|
return (
|
2022-09-21 21:25:24 -07:00
|
|
|
<>
|
|
|
|
<div className="grid grid-cols-12">
|
2022-10-30 22:00:21 -07:00
|
|
|
<div className="col-span-12 border-th-bkg-3 md:col-span-6 md:border-b lg:col-span-7 xl:col-span-8">
|
2022-11-18 11:11:06 -08:00
|
|
|
<SwapTokenChart />
|
2022-09-21 21:25:24 -07:00
|
|
|
</div>
|
2022-10-30 22:00:21 -07:00
|
|
|
<div className="col-span-12 mt-2 space-y-6 border-th-bkg-3 md:col-span-6 md:mt-0 md:border-b lg:col-span-5 xl:col-span-4">
|
|
|
|
<SwapForm />
|
2022-09-21 21:25:24 -07:00
|
|
|
</div>
|
|
|
|
<div className="col-span-12">
|
2022-10-06 20:16:11 -07:00
|
|
|
<SwapInfoTabs />
|
2022-09-21 21:25:24 -07:00
|
|
|
</div>
|
2022-07-14 18:46:34 -07:00
|
|
|
</div>
|
2023-03-02 09:02:26 -08:00
|
|
|
{showSwapIntro ? (
|
|
|
|
<SwapIntroModal
|
|
|
|
isOpen={showSwapIntro}
|
|
|
|
onClose={() => setShowSwapIntro(false)}
|
|
|
|
/>
|
|
|
|
) : null}
|
2022-09-21 21:25:24 -07:00
|
|
|
</>
|
2022-05-31 18:41:18 -07:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2022-09-14 18:06:00 -07:00
|
|
|
export default SwapPage
|