Skip to content

Commit

Permalink
feat: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre committed Jan 16, 2025
1 parent 381c8a2 commit 1604511
Showing 1 changed file with 1 addition and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
import { ArrowForwardIcon } from '@chakra-ui/icons'
import type { ResponsiveValue } from '@chakra-ui/react'
import { Button, Divider, Flex, ModalBody, ModalHeader, Stack } from '@chakra-ui/react'
import type { Property } from 'csstype'
import { Button, Divider, ModalBody, ModalHeader, Stack } from '@chakra-ui/react'
import { useCallback } from 'react'
import { useTranslate } from 'react-polyglot'
import type { RouteComponentProps } from 'react-router'
import { Text } from 'components/Text'
import { NativeWalletRoutes } from 'context/WalletProvider/types'
import { useFeatureFlag } from 'hooks/useFeatureFlag/useFeatureFlag'

const directionProp: ResponsiveValue<Property.FlexDirection> = ['column', 'row']
const mlProp = [0, 1.5]
const arrowForwardIcon = <ArrowForwardIcon />

export const NativeStart = ({ history }: RouteComponentProps) => {
const isShapeShiftMobileWalletEnabled = useFeatureFlag('ShapeShiftMobileWallet')
const translate = useTranslate()

const handleCreate = useCallback(() => history.push(NativeWalletRoutes.Create), [history])
const handleImportClick = useCallback(
() => history.push(NativeWalletRoutes.ImportSelect),
[history],
)
const handleLogin = useCallback(() => history.push(NativeWalletRoutes.LegacyLogin), [history])

return (
<>
Expand Down Expand Up @@ -57,29 +47,6 @@ export const NativeStart = ({ history }: RouteComponentProps) => {
>
<Text translation={'walletProvider.shapeShift.start.import'} />
</Button>
{isShapeShiftMobileWalletEnabled && (
<>
<Divider mt={4} />
<Flex
direction={directionProp}
mt={2}
pt={4}
justifyContent='center'
alignItems='center'
>
<Text translation={'walletProvider.shapeShift.legacy.haveMobileWallet'} />
<Button
variant='link'
ml={mlProp}
borderTopRadius='none'
colorScheme='blue'
onClick={handleLogin}
>
{translate('common.login')}
</Button>
</Flex>
</>
)}
</Stack>
</ModalBody>
</>
Expand Down

0 comments on commit 1604511

Please sign in to comment.