2022-02-07 13:34:36 +00:00
|
|
|
import ModalStore from '@/store/ModalStore'
|
2022-02-10 14:13:01 +00:00
|
|
|
import SessionProposalModal from '@/views/SessionProposalModal'
|
2022-02-16 12:02:39 +00:00
|
|
|
import SessionSendTransactionModal from '@/views/SessionSendTransactionModal'
|
2022-02-14 13:38:09 +00:00
|
|
|
import SessionRequestModal from '@/views/SessionSignModal'
|
2022-02-15 12:41:46 +00:00
|
|
|
import SessionSignTypedDataModal from '@/views/SessionSignTypedDataModal'
|
2022-02-07 13:34:36 +00:00
|
|
|
import { Modal as NextModal } from '@nextui-org/react'
|
|
|
|
import { useSnapshot } from 'valtio'
|
|
|
|
|
|
|
|
export default function Modal() {
|
2022-02-10 14:13:01 +00:00
|
|
|
const { open, view } = useSnapshot(ModalStore.state)
|
|
|
|
|
2022-02-07 13:34:36 +00:00
|
|
|
return (
|
2022-02-10 14:13:01 +00:00
|
|
|
<NextModal blur open={open} style={{ border: '1px solid rgba(139, 139, 139, 0.4)' }}>
|
|
|
|
{view === 'SessionProposalModal' && <SessionProposalModal />}
|
2022-02-14 13:38:09 +00:00
|
|
|
{view === 'SessionSignModal' && <SessionRequestModal />}
|
2022-02-15 12:41:46 +00:00
|
|
|
{view === 'SessionSignTypedDataModal' && <SessionSignTypedDataModal />}
|
2022-02-16 12:02:39 +00:00
|
|
|
{view === 'SessionSendTransactionModal' && <SessionSendTransactionModal />}
|
2022-02-07 13:34:36 +00:00
|
|
|
</NextModal>
|
|
|
|
)
|
|
|
|
}
|