mango-ui-v3/components/AlphaModal.tsx

67 lines
1.9 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'
2021-08-31 11:42:33 -07:00
export const ALPHA_MODAL_KEY = 'mangoAlphaAccepted-3.06'
2021-08-30 11:50:37 -07:00
const AlphaModal = ({
2021-04-15 09:34:59 -07:00
isOpen,
onClose,
}: {
isOpen: boolean
onClose?: (x) => void
}) => {
2021-08-30 11:50:37 -07:00
const [, setAlphaAccepted] = useLocalStorageState(ALPHA_MODAL_KEY, 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
2021-08-25 11:47:57 -07:00
className={`h-12 w-auto`}
2021-06-08 07:59:39 -07:00
src="/assets/icons/logo.svg"
alt="next"
/>
</div>
2021-04-15 09:34:59 -07:00
</div>
</Modal.Header>
2021-08-25 11:47:57 -07:00
<div className={`text-th-fgd-2 text-center text-xl text-strong`}>
2021-08-31 10:47:03 -07:00
Welcome to Mango V3
2021-06-08 07:59:39 -07:00
</div>
<div className="text-th-fgd-2 text-center my-4">
2021-08-31 11:41:27 -07:00
The V3 protocol is in public beta. This is unaudited software, use at
2021-08-31 10:47:03 -07:00
your own risk.
2021-08-25 11:49:04 -07:00
</div>
2021-08-31 11:03:26 -07:00
<div className="text-th-fgd-2 text-center my-4">
2021-08-31 11:42:33 -07:00
V3 is a new and separate program from V2. You can access your V2 account
in the &quot;More&quot; section of the top bar or by using this link:{' '}
2021-08-31 11:03:26 -07:00
<a
href="https://v2.mango.markets"
target="_blank"
rel="noopener noreferrer"
>
https://v2.mango.markets
</a>
</div>
2021-08-25 11:49:04 -07:00
<div className="text-th-fgd-2 text-center my-2">
2021-08-25 11:55:31 -07:00
&#x1F642; &#129389;&#129309;
2021-06-08 07:59:39 -07:00
</div>
<div className={`text-th-fgd-2 text-center`}>
<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)