feat(migrate-panel): add state and handler for warning

This commit is contained in:
RadoslavDimchev 2024-02-20 12:34:10 +02:00 committed by Emil Ivanichkov
parent 0e371ac3f4
commit b69f9902ae
1 changed files with 11 additions and 5 deletions

View File

@ -1,11 +1,14 @@
import { Button, InformationBox, Text } from '@status-im/components'
import { CloseCircleIcon } from '@status-im/icons'
import { YStack } from 'tamagui'
import { useState } from 'react'
import KeystoreBackupsCard from '../../../../ValidatorOnboarding/KeyGeneration/KeystoreFiles/KeystoreBackupsCard'
import PanelWrapper from './PanelWrapper'
const MigratePanel = () => {
const [isVisibleWarning, setIsVisibleWarning] = useState(true)
const migrateValidatorHandler = () => {}
return (
@ -31,11 +34,14 @@ const MigratePanel = () => {
</Text>
</YStack>
<KeystoreBackupsCard />
{isVisibleWarning && (
<InformationBox
message="Please make sure to enforce the file on another node to continue validating with your Validator."
variant="error"
icon={<CloseCircleIcon size={20} />}
onClosePress={() => setIsVisibleWarning(false)}
/>
)}
<Button onPress={migrateValidatorHandler}>Migrate Validator</Button>
</PanelWrapper>
)