feat(device-onboarding): remove old style and use classname
This commit is contained in:
parent
734d11a83a
commit
7bea0cd7ed
|
@ -1,8 +1,8 @@
|
||||||
import { useSelector } from 'react-redux'
|
import { useSelector } from 'react-redux'
|
||||||
import { Stack, XStack, YStack } from 'tamagui'
|
import { Stack, YStack } from 'tamagui'
|
||||||
import { CloseCircleIcon } from '@status-im/icons'
|
import { CloseCircleIcon } from '@status-im/icons'
|
||||||
import { Button, InformationBox } from '@status-im/components'
|
import { Button, InformationBox } from '@status-im/components'
|
||||||
import type { Property } from 'csstype'
|
import { useNavigate } from 'react-router-dom'
|
||||||
|
|
||||||
import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow'
|
import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow'
|
||||||
import NimbusLogo from '../../components/Logos/NimbusLogo'
|
import NimbusLogo from '../../components/Logos/NimbusLogo'
|
||||||
|
@ -13,8 +13,7 @@ import HealthInfoSection from '../../components/General/HealthInfoSection'
|
||||||
import DeviceMemory from '../../components/Charts/DeviceMemoryHealth'
|
import DeviceMemory from '../../components/Charts/DeviceMemoryHealth'
|
||||||
import DeviceNetworkHealth from '../../components/Charts/DeviceNetworkHealth'
|
import DeviceNetworkHealth from '../../components/Charts/DeviceNetworkHealth'
|
||||||
import { RootState } from '../../redux/store'
|
import { RootState } from '../../redux/store'
|
||||||
import { useWindowSize } from '../../hooks/useWindowSize'
|
import styles from './deviceHealthCheckOnboarding.module.css'
|
||||||
import { useNavigate } from 'react-router-dom'
|
|
||||||
|
|
||||||
const DeviceHealthCheckOnboarding = () => {
|
const DeviceHealthCheckOnboarding = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
@ -24,19 +23,6 @@ const DeviceHealthCheckOnboarding = () => {
|
||||||
const navigateFlow = useSelector(
|
const navigateFlow = useSelector(
|
||||||
(state: RootState) => state.navigationFLow.navigationFlow,
|
(state: RootState) => state.navigationFLow.navigationFlow,
|
||||||
)
|
)
|
||||||
const windowSize = useWindowSize()
|
|
||||||
const breakpoint = 768
|
|
||||||
|
|
||||||
const responsiveStyle = {
|
|
||||||
flexWrap: (windowSize.width <= breakpoint
|
|
||||||
? 'wrap'
|
|
||||||
: 'nowrap') as Property.FlexWrap,
|
|
||||||
flexDirection: (windowSize.width <= breakpoint
|
|
||||||
? 'column'
|
|
||||||
: 'row') as Property.FlexDirection,
|
|
||||||
alignItems: 'flex-start',
|
|
||||||
width: windowSize.width <= breakpoint ? '200%' : '100%',
|
|
||||||
}
|
|
||||||
|
|
||||||
const continueHandler = () => {
|
const continueHandler = () => {
|
||||||
navigate(
|
navigate(
|
||||||
|
@ -64,20 +50,18 @@ const DeviceHealthCheckOnboarding = () => {
|
||||||
subtitle="Configure your device to start Staking on Nimbus"
|
subtitle="Configure your device to start Staking on Nimbus"
|
||||||
isAdvancedSettings={true}
|
isAdvancedSettings={true}
|
||||||
/>
|
/>
|
||||||
<Stack space={'$4'} style={responsiveStyle}>
|
<div className={styles['cards-container']}>
|
||||||
<DeviceStorageHealth
|
<DeviceStorageHealth
|
||||||
storage={deviceHealthState.storage}
|
storage={deviceHealthState.storage}
|
||||||
maxStorage={deviceHealthState.maxMemory}
|
maxStorage={deviceHealthState.maxMemory}
|
||||||
/>
|
/>
|
||||||
<DeviceCPULoad load={deviceHealthState.cpuLoad} />
|
<DeviceCPULoad load={deviceHealthState.cpuLoad} />
|
||||||
</Stack>
|
|
||||||
<XStack space={'$4'} style={responsiveStyle}>
|
|
||||||
<DeviceMemory
|
<DeviceMemory
|
||||||
currentMemory={deviceHealthState.memory}
|
currentMemory={deviceHealthState.memory}
|
||||||
maxMemory={deviceHealthState.maxMemory}
|
maxMemory={deviceHealthState.maxMemory}
|
||||||
/>
|
/>
|
||||||
<DeviceNetworkHealth latency={deviceHealthState.latency} />
|
<DeviceNetworkHealth latency={deviceHealthState.latency} />
|
||||||
</XStack>
|
</div>
|
||||||
<HealthInfoSection
|
<HealthInfoSection
|
||||||
usedStorage={120}
|
usedStorage={120}
|
||||||
maxStorage={160}
|
maxStorage={160}
|
||||||
|
|
Loading…
Reference in New Issue