From 69575aa4a18043a2a8b8b75d22bfd5661ea05a14 Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Mon, 11 Sep 2023 10:36:23 +0300 Subject: [PATCH] fix: clean code activation and os card --- .../Activation/Activation.tsx | 80 +++++++++---------- .../ValidatorInstalling/osCard.stories.tsx | 23 +++--- 2 files changed, 50 insertions(+), 53 deletions(-) diff --git a/src/pages/ValidatorOnboarding/Activation/Activation.tsx b/src/pages/ValidatorOnboarding/Activation/Activation.tsx index 17217794..4e8b8948 100644 --- a/src/pages/ValidatorOnboarding/Activation/Activation.tsx +++ b/src/pages/ValidatorOnboarding/Activation/Activation.tsx @@ -2,45 +2,30 @@ import { useState, useEffect } from 'react' import { XStack, Stack, YStack } from 'tamagui' import { Text } from '@status-im/components' import Confetti from 'react-confetti' + import ActivationCard from './ActivationCard' import LinkWithArrow from '../../../components/General/LinkWithArrow' - -const styles = { - confettiContainer: { - position: 'relative' as const, - width: '100%', - height: '100%', - }, - confettiCanvas: { - position: 'absolute' as const, - top: 0, - left: 0, - width: '100%', - height: '100%', - zIndex: 0, - }, -} type ActivationProps = { - validatorsValue: string; + validatorsValue: string executionSyncStatus1: { - text: string; - isGaugeIncluded: boolean; - gaugeColor: string; - gaugeSynced: number; - gaugeTotal: number; - }; + text: string + isGaugeIncluded: boolean + gaugeColor: string + gaugeSynced: number + gaugeTotal: number + } executionSyncStatus2: { - text: string; - isGaugeIncluded: boolean; - gaugeColor: string; - gaugeSynced: number; - gaugeTotal: number; - }; - currentAPRValue: string; - estimatedActivationTimeValue: string; - validatorQueueValue: string; -}; + text: string + isGaugeIncluded: boolean + gaugeColor: string + gaugeSynced: number + gaugeTotal: number + } + currentAPRValue: string + estimatedActivationTimeValue: string + validatorQueueValue: string +} const Activation = ({ validatorsValue, @@ -79,16 +64,15 @@ const Activation = ({ - - + + - + @@ -105,3 +89,19 @@ const Activation = ({ } export default Activation + +const styles = { + confettiContainer: { + position: 'relative' as const, + width: '100%', + height: '100%', + }, + confettiCanvas: { + position: 'absolute' as const, + top: 0, + left: 0, + width: '100%', + height: '100%', + zIndex: 0, + }, +} diff --git a/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorInstalling/osCard.stories.tsx b/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorInstalling/osCard.stories.tsx index c869e7e6..27e67222 100644 --- a/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorInstalling/osCard.stories.tsx +++ b/src/pages/ValidatorOnboarding/ValidatorSetup/ValidatorInstalling/osCard.stories.tsx @@ -1,23 +1,20 @@ import type { Meta, StoryObj } from '@storybook/react' -import osCard from './OsCard' +import OsCard from './OsCard' const meta = { - title: 'ValidatorOnboarding/osCard', - component: osCard, - parameters: { - layout: 'centered', - }, - tags: ['autodocs'], -} satisfies Meta + title: 'ValidatorOnboarding/OsCard', + component: OsCard, + tags: ['autodocs'], +} satisfies Meta export default meta type Story = StoryObj export const Default: Story = { - args: { - icon: "/icons/MAC.png", - name: "Mac", - isSelected: true - }, + args: { + icon: '/icons/MAC.png', + name: 'Mac', + isSelected: true, + }, }