diff --git a/src/pages/ValidatorOnboarding/ValidatorSetup/PairedDeviceCard.stories.tsx b/src/pages/ValidatorOnboarding/ValidatorSetup/PairedDeviceCard.stories.tsx index 7e1ba6c7..df393196 100644 --- a/src/pages/ValidatorOnboarding/ValidatorSetup/PairedDeviceCard.stories.tsx +++ b/src/pages/ValidatorOnboarding/ValidatorSetup/PairedDeviceCard.stories.tsx @@ -18,8 +18,6 @@ type Story = StoryObj export const Default: Story = { args: { - valueOf: () => { - return true - }, + isVisibleState: true, }, } diff --git a/src/pages/ValidatorOnboarding/ValidatorSetup/PairedDeviceCard.tsx b/src/pages/ValidatorOnboarding/ValidatorSetup/PairedDeviceCard.tsx index 5c33a804..ee33cf74 100644 --- a/src/pages/ValidatorOnboarding/ValidatorSetup/PairedDeviceCard.tsx +++ b/src/pages/ValidatorOnboarding/ValidatorSetup/PairedDeviceCard.tsx @@ -1,12 +1,17 @@ -import { useState } from 'react' +import { useEffect, useState } from 'react' import { XStack, YStack } from 'tamagui' import { ClearIcon } from '@status-im/icons' import { Avatar, Text } from '@status-im/components' + type PairedDeviceCardProps = { isVisibleState: boolean } const PairedDeviceCard = (isVisibleState: PairedDeviceCardProps) => { - const [isVisible, setIsVisible] = useState(isVisibleState) + const [isVisible, setIsVisible] = useState(true) + + useEffect(() => { + setIsVisible(isVisibleState.isVisibleState) + }, [isVisibleState]) if (!isVisible) return null