feat(pages-with-sidebars): add wrapper and remove sidebars

This commit is contained in:
RadoslavDimchev 2024-03-28 21:35:26 +02:00 committed by Radoslav Dimchev
parent 1caab5d4ae
commit bac19a911c
4 changed files with 16 additions and 30 deletions

View File

@ -1,5 +1,5 @@
import { useSelector } from 'react-redux' import { useSelector } from 'react-redux'
import { XStack, YStack } from 'tamagui' import { YStack } from 'tamagui'
import { CloseCircleIcon } from '@status-im/icons' import { CloseCircleIcon } from '@status-im/icons'
import { InformationBox } from '@status-im/components' import { InformationBox } from '@status-im/components'
@ -10,9 +10,8 @@ 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 TitleLogo from '../../components/General/TitleLogo' import TitleLogo from '../../components/General/TitleLogo'
import RightSidebar from '../../components/General/RightSideBar/RightSidebar'
import LeftSidebar from '../../components/General/LeftSidebar/LeftSidebar'
import styles from './deviceHealthCheck.module.css' import styles from './deviceHealthCheck.module.css'
import SidebarsWrapper from '../../components/PageWrappers/SidebarsWrapper'
const DeviceHealthCheck = () => { const DeviceHealthCheck = () => {
const deviceHealthState = useSelector( const deviceHealthState = useSelector(
@ -20,8 +19,7 @@ const DeviceHealthCheck = () => {
) )
return ( return (
<XStack style={{ height: '100vh' }}> <SidebarsWrapper>
<LeftSidebar />
<YStack <YStack
space={'$4'} space={'$4'}
alignItems="flex-start" alignItems="flex-start"
@ -59,8 +57,7 @@ const DeviceHealthCheck = () => {
message="The information provided in the Nodes Health Check is meant to utilized as a guide to guage the readiness of your device, however please do your own due diligence prior to commiting any funds. Read our Health Check Disclosure for more information." message="The information provided in the Nodes Health Check is meant to utilized as a guide to guage the readiness of your device, however please do your own due diligence prior to commiting any funds. Read our Health Check Disclosure for more information."
/> />
</YStack> </YStack>
<RightSidebar /> </SidebarsWrapper>
</XStack>
) )
} }

View File

@ -1,19 +1,16 @@
import { Stack, XStack, YStack } from 'tamagui' import { Stack, XStack, YStack } from 'tamagui'
import { useSelector } from 'react-redux'
import { useState } from 'react'
import LeftSidebar from '../../components/General/LeftSidebar/LeftSidebar'
import RightSidebar from '../../components/General/RightSideBar/RightSidebar'
import LogsTerminal from './LogsTerminal' import LogsTerminal from './LogsTerminal'
import LogsSumCard from './LogsSumCard' import LogsSumCard from './LogsSumCard'
import SupportCard from './SupportCard' import SupportCard from './SupportCard'
import { useState } from 'react'
import HeaderBtns from './HeaderBtns' import HeaderBtns from './HeaderBtns'
import TitleLogo from '../../components/General/TitleLogo' import TitleLogo from '../../components/General/TitleLogo'
import { useWindowSize } from '../../hooks/useWindowSize' import SidebarsWrapper from '../../components/PageWrappers/SidebarsWrapper'
import { useSelector } from 'react-redux'
import { RootState } from '../../redux/store' import { RootState } from '../../redux/store'
const LogsPage = () => { const LogsPage = () => {
const windowSize = useWindowSize()
const [highLightSearched, setHighLightSearched] = useState(false) const [highLightSearched, setHighLightSearched] = useState(false)
const [searchInput, setSearchInput] = useState('') const [searchInput, setSearchInput] = useState('')
const [timestamps, setTimestamps] = useState(true) const [timestamps, setTimestamps] = useState(true)
@ -25,8 +22,7 @@ const LogsPage = () => {
} }
return ( return (
<XStack style={{ height: '100vh' }}> <SidebarsWrapper>
<LeftSidebar />
<YStack <YStack
space="$4" space="$4"
alignItems="flex-start" alignItems="flex-start"
@ -100,8 +96,7 @@ const LogsPage = () => {
</Stack> </Stack>
</Stack> </Stack>
</YStack> </YStack>
{windowSize.width > 900 && <RightSidebar />} </SidebarsWrapper>
</XStack>
) )
} }

View File

@ -1,13 +1,12 @@
import { XStack } from 'tamagui' import { XStack } from 'tamagui'
import { Outlet } from 'react-router-dom' import { Outlet } from 'react-router-dom'
import LeftSidebar from '../../components/General/LeftSidebar/LeftSidebar'
import LeftManage from './LeftManage/LeftManage' import LeftManage from './LeftManage/LeftManage'
import SidebarsWrapper from '../../components/PageWrappers/SidebarsWrapper'
const ManageValidator = () => { const ManageValidator = () => {
return ( return (
<XStack style={{ height: '100vh' }}> <SidebarsWrapper isNotRightSideBar={true}>
<LeftSidebar />
<XStack <XStack
width={'min-content'} width={'min-content'}
alignItems="flex-start" alignItems="flex-start"
@ -20,7 +19,7 @@ const ManageValidator = () => {
<Outlet /> <Outlet />
</div> </div>
</XStack> </XStack>
</XStack> </SidebarsWrapper>
) )
} }

View File

@ -1,18 +1,16 @@
import { Text } from '@status-im/components' import { Text } from '@status-im/components'
import { XStack, YStack } from 'tamagui' import { YStack } from 'tamagui'
import LeftSidebar from '../../components/General/LeftSidebar/LeftSidebar'
import RightSidebar from '../../components/General/RightSideBar/RightSidebar'
import ManagementTabs from './ManagementTabs' import ManagementTabs from './ManagementTabs'
import AddCardsContainer from '../../components/General/AddCards/AddCardsContainer' import AddCardsContainer from '../../components/General/AddCards/AddCardsContainer'
import ManagementHeader from './ManagementHeader' import ManagementHeader from './ManagementHeader'
import ManagementCard from './ManagementCard' import ManagementCard from './ManagementCard'
import styles from './validatorManagement.module.css' import styles from './validatorManagement.module.css'
import SidebarsWrapper from '../../components/PageWrappers/SidebarsWrapper'
const ValidatorManagement = () => { const ValidatorManagement = () => {
return ( return (
<XStack style={{ height: '100vh' }}> <SidebarsWrapper>
<LeftSidebar />
<YStack <YStack
space="$4" space="$4"
alignItems="flex-start" alignItems="flex-start"
@ -43,10 +41,7 @@ const ValidatorManagement = () => {
</Text> </Text>
<ManagementTabs /> <ManagementTabs />
</YStack> </YStack>
<div className={styles['right-sidebar-wrapper']}> </SidebarsWrapper>
<RightSidebar />
</div>
</XStack>
) )
} }