diff --git a/src/pages/ManageValidator/RightManagePanels/PanelWrapper.tsx b/src/pages/ManageValidator/RightManagePanels/PanelWrapper.tsx index 6b63747c..d05aaeeb 100644 --- a/src/pages/ManageValidator/RightManagePanels/PanelWrapper.tsx +++ b/src/pages/ManageValidator/RightManagePanels/PanelWrapper.tsx @@ -1,8 +1,11 @@ import { Text } from '@status-im/components' import { useState } from 'react' import ReactModal from 'react-modal' +import { useNavigate, useParams } from 'react-router-dom' import { YStack } from 'tamagui' +import { PATHS } from '../../../constants' + type PanelWrapperProps = { children: React.ReactNode title: string @@ -10,9 +13,18 @@ type PanelWrapperProps = { const PanelWrapper = ({ children, title }: PanelWrapperProps) => { const [isModalOpen, setIsModalOpen] = useState(true) + const navigate = useNavigate() + const { validatorName } = useParams() + + const closeModal = () => { + setIsModalOpen(false) + navigate(`${PATHS.MANAGE_VALIDATOR}/${validatorName}`) + } + return (