feat: remove not used components from Advicsories

This commit is contained in:
RadoslavDimchev 2023-08-25 10:02:30 +03:00
parent f63d9c5798
commit ab17c39a82
1 changed files with 31 additions and 43 deletions

View File

@ -1,8 +1,7 @@
import { Button, Text } from '@status-im/components' import { Text } from '@status-im/components'
import { useState } from 'react' import { useState } from 'react'
import { Stack, XStack, YStack } from 'tamagui' import { Stack, XStack, YStack } from 'tamagui'
import AdvisoriesContent from './AdvisoriesContent' import AdvisoriesContent from './AdvisoriesContent'
import ValidatorBoxWrapper from '../ValidatorBoxWrapper/ValidatorBoxWrapper'
type AdvisoryTopicsType = { type AdvisoryTopicsType = {
[key: string]: string [key: string]: string
@ -24,46 +23,35 @@ const Advicsories = () => {
const [selectedTitle, setSelectedTitle] = useState('Bad Behaviour') const [selectedTitle, setSelectedTitle] = useState('Bad Behaviour')
return ( return (
<> <XStack
<ValidatorBoxWrapper> justifyContent={'space-between'}
<XStack className="layout-left"
justifyContent={'space-between'} space={10}
className="layout-left" style={{ padding: '16px 32px' }}
space={10} >
style={{ padding: '16px 32px' }} <YStack>
> <Stack>
<YStack> <Text size={27}>Advisories</Text>
<Stack> </Stack>
<Text size={27}>Advisories</Text> {Object.keys(advisoryTopics).map((title, index) => (
</Stack> <Stack key={title} onPress={() => setSelectedTitle(title)} style={{ cursor: 'pointer' }}>
{Object.keys(advisoryTopics).map((title, index) => ( <Text
<Stack size={15}
key={title} weight={selectedTitle === title && 'semibold'}
onPress={() => setSelectedTitle(title)} color={selectedTitle === title ? 'blue' : undefined}
style={{ cursor: 'pointer' }} >
> {unicodeNumbers[index]} {title}
<Text </Text>
size={15} </Stack>
weight={selectedTitle === title && 'semibold'} ))}
color={selectedTitle === title ? 'blue' : undefined} </YStack>
> <YStack>
{unicodeNumbers[index]} {title} <AdvisoriesContent
</Text> title={selectedTitle}
</Stack> content={advisoryTopics[selectedTitle]}
))} ></AdvisoriesContent>
</YStack> </YStack>
<YStack> </XStack>
<AdvisoriesContent
title={selectedTitle}
content={advisoryTopics[selectedTitle]}
></AdvisoriesContent>
</YStack>
</XStack>
</ValidatorBoxWrapper>
<Stack style={{ alignItems: 'end', width: '100%', marginTop: '16px' }}>
<Button>Continue</Button>
</Stack>
</>
) )
} }