fix mobile scrolling

This commit is contained in:
Ilja 2022-02-15 12:47:36 +02:00
parent bff24051d5
commit 96d8650508
4 changed files with 61 additions and 10 deletions

View File

@ -2,14 +2,6 @@
box-sizing: border-box;
}
body,
html {
position: fixed;
height: 100vh;
width: 100vw;
overflow: hidden;
}
.routeTransition {
width: 100%;
height: 100%;

View File

@ -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
*/

View File

@ -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>

View 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