update modal with sol srm info

This commit is contained in:
Tyler Shipe 2021-06-08 10:59:39 -04:00
parent 9e16290300
commit 1afe59e4e0
6 changed files with 47 additions and 20 deletions

View File

@ -1,7 +1,6 @@
import React from 'react'
import Modal from './Modal'
import Button from './Button'
import { ElementTitle } from './styles'
import useLocalStorageState from '../hooks/useLocalStorageState'
const AlphaModal = ({
@ -11,23 +10,50 @@ const AlphaModal = ({
isOpen: boolean
onClose?: (x) => void
}) => {
const [, setAlphaAccepted] = useLocalStorageState('mangoAlphaAccepted', false)
const [, setAlphaAccepted] = useLocalStorageState(
'mangoAlphaAccepted-2.0',
false
)
return (
<Modal isOpen={isOpen} onClose={onClose} hideClose>
<Modal.Header>
<div className="flex flex-col items-center">
<img
className={`h-8 w-auto mb-2`}
src="/assets/icons/logo.svg"
alt="next"
/>
<ElementTitle noMarignBottom>Mango Markets UI V2</ElementTitle>
<div className="flex space-x-8 items-center justify-center ">
<img
className={`h-8 w-auto mb-2`}
src="/assets/icons/sol.svg"
alt="next"
/>
<img
className={`h-12 w-auto mb-2`}
src="/assets/icons/logo.svg"
alt="next"
/>
<img
className={`h-10 w-auto mb-2`}
src="/assets/icons/srm.svg"
alt="next"
/>
</div>
</div>
</Modal.Header>
<div className={`text-th-fgd-2 text-center`}>
This is an unaudited alpha release of Mango Markets. The software is
provided &apos;AS IS&apos; without warranty of any kind.
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`}>
<Button onClick={() => setAlphaAccepted(true)}>
<div className={`flex items-center`}>Accept</div>

View File

@ -46,9 +46,9 @@ const MarketSelect = () => {
<div className="mr-10 text-xs">
<a
href="https://old.mango.markets"
className="text-th-fgd-3 default-transition underline hover:text-th-primary hover:no-underline"
className="text-primary default-transition underline hover:text-th-primary hover:no-underline border-1"
>
Use V1
Go to Mango V1
</a>
</div>
</div>

View File

@ -31,7 +31,7 @@
}
},
"dependencies": {
"@blockworks-foundation/mango-client": "https://github.com/blockworks-foundation/mango-client-ts#5_tokens",
"@blockworks-foundation/mango-client": "^1.0.0",
"@emotion/react": "^11.1.5",
"@emotion/styled": "^11.1.5",
"@headlessui/react": "^1.2.0",

View File

@ -50,7 +50,7 @@ export default function Account() {
{selectedMarginAccount ? (
<div className="divide-x divide-th-fgd-4 flex justify-center w-full pt-4 sm:pt-0 sm:justify-end">
<div className="pr-4 text-xs text-th-fgd-1">
<div className="pb-0.5 text-2xs text-th-fgd-3">Acct Owner</div>
<div className="pb-0.5 text-2xs text-th-fgd-3">Owner</div>
<a
className="default-transition flex items-center text-th-fgd-2"
href={`https://explorer.solana.com/address/${selectedMarginAccount?.owner}`}

View File

@ -6,7 +6,7 @@ import MarketHeader from '../components/MarketHeader'
import useLocalStorageState from '../hooks/useLocalStorageState'
const Index = () => {
const [alphaAccepted] = useLocalStorageState('mangoAlphaAccepted', false)
const [alphaAccepted] = useLocalStorageState('mangoAlphaAccepted-2.0', false)
return (
<div className={`bg-th-bkg-1 text-th-fgd-1 transition-all `}>

View File

@ -986,9 +986,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@blockworks-foundation/mango-client@https://github.com/blockworks-foundation/mango-client-ts#5_tokens":
version "0.1.19"
resolved "https://github.com/blockworks-foundation/mango-client-ts#e0627fcd34b06844ede05f65317e8c7ce9d2b29d"
"@blockworks-foundation/mango-client@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-client/-/mango-client-1.0.0.tgz#d298fff4e3e83a954532a5402e7d997118487aa5"
integrity sha512-WCq+M6ynSOvHqD1977AVeEyyu/qZrC7AsqTTULDpM55pdXwwiwfNBHyzzTEvTpEmoJJJjh4kRimhnJrmROLb6g==
dependencies:
"@project-serum/common" "^0.0.1-beta.3"
"@project-serum/serum" "^0.13.20"
@ -2514,9 +2515,9 @@ boolbase@^1.0.0, boolbase@~1.0.0:
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
"borsh@https://github.com/defactojob/borsh-js#field-mapper":
"borsh@git+https://github.com/defactojob/borsh-js.git#field-mapper":
version "0.3.1"
resolved "https://github.com/defactojob/borsh-js#33a0d24af281112c0a48efb3fa503f3212443de9"
resolved "git+https://github.com/defactojob/borsh-js.git#33a0d24af281112c0a48efb3fa503f3212443de9"
dependencies:
"@types/bn.js" "^4.11.5"
bn.js "^5.0.0"