diff --git a/src/pages/ManageValidator/RightManagePanels/PanelWrapper.tsx b/src/pages/ManageValidator/RightManagePanels/PanelWrapper.tsx index 6abb5d5b..d97a3a86 100644 --- a/src/pages/ManageValidator/RightManagePanels/PanelWrapper.tsx +++ b/src/pages/ManageValidator/RightManagePanels/PanelWrapper.tsx @@ -1,11 +1,10 @@ -import { Text } from '@status-im/components' -import { ExpandRsIcon } from '@status-im/icons' import { useState } from 'react' import Modal from 'react-modal' import { useNavigate, useParams } from 'react-router-dom' -import { XStack, YStack } from 'tamagui' import { PATHS } from '../../../constants' +import { useWindowSize } from '../../../hooks/useWindowSize' +import PanelContent from './PanelContent' type PanelWrapperProps = { children: React.ReactNode @@ -16,6 +15,8 @@ const PanelWrapper = ({ children, title }: PanelWrapperProps) => { const [isModalOpen, setIsModalOpen] = useState(true) const navigate = useNavigate() const { validatorName } = useParams() + const { width } = useWindowSize() + const isModalWidth = width < 1160 const closeModal = () => { setIsModalOpen(false) @@ -23,36 +24,36 @@ const PanelWrapper = ({ children, title }: PanelWrapperProps) => { } return ( - - - - - {title} - - - - {children} - - + <> + {isModalWidth ? ( + + + {children} + + + ) : ( +
+ + {children} + +
+ )} + ) }