fix mobile scrolling
This commit is contained in:
parent
bff24051d5
commit
96d8650508
@ -2,14 +2,6 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body,
|
||||
html {
|
||||
position: fixed;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.routeTransition {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -43,6 +43,33 @@ export const EIP155_CHAINS = {
|
||||
}
|
||||
}
|
||||
|
||||
export const EIP155_TEST_CHAINS = {
|
||||
'eip155:4': {
|
||||
chainId: 4,
|
||||
name: 'Ethereum Rinkeby',
|
||||
logo: LOGO_BASE_URL + 'eip155:1.png',
|
||||
rgb: '99, 125, 234'
|
||||
},
|
||||
'eip155:69': {
|
||||
chainId: 69,
|
||||
name: 'Optimism Kovan',
|
||||
logo: LOGO_BASE_URL + 'eip155:10.png',
|
||||
rgb: '233, 1, 1'
|
||||
},
|
||||
'eip155:80001': {
|
||||
chainId: 80001,
|
||||
name: 'Polygon Mumbai',
|
||||
logo: LOGO_BASE_URL + 'eip155:137.png',
|
||||
rgb: '130, 71, 229'
|
||||
},
|
||||
'eip155:421611': {
|
||||
chainId: 421611,
|
||||
name: 'Arbitrum Rinkeby',
|
||||
logo: LOGO_BASE_URL + 'eip155:42161.png',
|
||||
rgb: '44, 55, 75'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Methods
|
||||
*/
|
||||
|
@ -1,12 +1,15 @@
|
||||
import PageHeader from '@/components/PageHeader'
|
||||
import SettingsStore from '@/store/SettingsStore'
|
||||
import { wallet } from '@/utils/WalletUtil'
|
||||
import { Card, Divider, Row, Switch, Text, useTheme } from '@nextui-org/react'
|
||||
import { useTheme as useNextTheme } from 'next-themes'
|
||||
import { Fragment } from 'react'
|
||||
import { useSnapshot } from 'valtio'
|
||||
|
||||
export default function SettingsPage() {
|
||||
const { setTheme } = useNextTheme()
|
||||
const { isDark, type } = useTheme()
|
||||
const { testNets } = useSnapshot(SettingsStore.state)
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
@ -29,7 +32,8 @@ export default function SettingsPage() {
|
||||
Testnets
|
||||
</Text>
|
||||
<Row justify="space-between" align="center">
|
||||
<Switch /> <Text>Dissabled</Text>
|
||||
<Switch checked={testNets} onChange={SettingsStore.toggleTestNets} />
|
||||
<Text>{testNets ? 'Enabled' : 'Disabled'}</Text>
|
||||
</Row>
|
||||
|
||||
<Divider y={3} />
|
||||
@ -38,7 +42,7 @@ export default function SettingsPage() {
|
||||
Theme
|
||||
</Text>
|
||||
<Row justify="space-between" align="center">
|
||||
<Switch checked={isDark} onChange={e => setTheme(e.target.checked ? 'dark' : 'light')} />{' '}
|
||||
<Switch checked={isDark} onChange={e => setTheme(e.target.checked ? 'dark' : 'light')} />
|
||||
<Text>{type}</Text>
|
||||
</Row>
|
||||
</Fragment>
|
||||
|
28
wallets/react-wallet-v2/src/store/SettingsStore.ts
Normal file
28
wallets/react-wallet-v2/src/store/SettingsStore.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { proxy } from 'valtio'
|
||||
|
||||
/**
|
||||
* Types
|
||||
*/
|
||||
interface State {
|
||||
testNets: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* State
|
||||
*/
|
||||
const state = proxy<State>({
|
||||
testNets: false
|
||||
})
|
||||
|
||||
/**
|
||||
* Store / Actions
|
||||
*/
|
||||
const SettingsStore = {
|
||||
state,
|
||||
|
||||
toggleTestNets() {
|
||||
state.testNets = !state.testNets
|
||||
}
|
||||
}
|
||||
|
||||
export default SettingsStore
|
Loading…
Reference in New Issue
Block a user