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