mango-ui-v3/components/AlphaModal.tsx

62 lines
1.6 KiB
TypeScript
Raw Normal View History

2021-08-16 10:59:44 -07:00
import React from 'react'
2021-04-15 09:34:59 -07:00
import Modal from './Modal'
import Button from './Button'
import useLocalStorageState from '../hooks/useLocalStorageState'
const AlphaModal = ({
2021-04-15 09:34:59 -07:00
isOpen,
onClose,
}: {
isOpen: boolean
onClose?: (x) => void
}) => {
2021-06-08 07:59:39 -07:00
const [, setAlphaAccepted] = useLocalStorageState(
'mangoAlphaAccepted-2.0',
false
)
2021-08-01 05:48:15 -07:00
const handleAccept = () => {
setAlphaAccepted(true)
}
2021-04-15 09:34:59 -07:00
return (
<Modal isOpen={isOpen} onClose={onClose} hideClose>
2021-04-15 09:34:59 -07:00
<Modal.Header>
<div className="flex flex-col items-center">
2021-06-08 07:59:39 -07:00
<div className="flex space-x-8 items-center justify-center ">
<img
className={`h-12 w-auto mb-2`}
src="/assets/icons/logo.svg"
alt="next"
/>
</div>
2021-04-15 09:34:59 -07:00
</div>
</Modal.Header>
<div className={`text-th-fgd-2 text-center`}>
2021-06-08 07:59:39 -07:00
SOL and SRM now available with USDC!
</div>
<div className="text-th-fgd-2 text-center my-4">
Visit{' '}
<a
href="https://usdt.mango.markets"
target="_blank"
rel="noopener noreferrer"
>
https://usdt.mango.markets
</a>{' '}
to access the USDT mango group.
</div>
<div className={`text-th-fgd-2 text-center`}>
Mango Markets is unaudited software. Use at your own risk.
<div className={`mt-4 flex justify-center`}>
2021-08-01 05:48:15 -07:00
<Button onClick={handleAccept}>
2021-04-15 09:34:59 -07:00
<div className={`flex items-center`}>Accept</div>
</Button>
</div>
</div>
</Modal>
)
}
export default React.memo(AlphaModal)