From add34f80cce38a62247f48d05684d6ab62bb8518 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Wed, 27 Mar 2024 23:16:05 +0200 Subject: [PATCH] feat(validator info): add types --- .../LeftManage/ValidatorBlueSection/ValidatorInfo.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/ManageValidator/LeftManage/ValidatorBlueSection/ValidatorInfo.tsx b/src/pages/ManageValidator/LeftManage/ValidatorBlueSection/ValidatorInfo.tsx index db694211..d51123be 100644 --- a/src/pages/ManageValidator/LeftManage/ValidatorBlueSection/ValidatorInfo.tsx +++ b/src/pages/ManageValidator/LeftManage/ValidatorBlueSection/ValidatorInfo.tsx @@ -7,7 +7,7 @@ import Icon from '../../../../components/General/Icon' import { useState } from 'react' const ValidatorInfo = () => { - const intervalsOfTime = ['Day', 'Week', 'Month', 'Year'] + const intervalsOfTime: string[] = ['Day', 'Week', 'Month', 'Year'] const [currentInterval, setCurrentInterval] = useState(0) const toggleIntervalChange = () => { @@ -17,7 +17,8 @@ const ValidatorInfo = () => { } const togglePreviousInterval = () => { setCurrentInterval( - prevInterval => (prevInterval - 1 + intervalsOfTime.length) % intervalsOfTime.length, + prevInterval => + (prevInterval - 1 + intervalsOfTime.length) % intervalsOfTime.length, ) }