import React, { ReactNode, useEffect } from 'react'; import { Flex, FlexProps } from '@chakra-ui/react'; import { useLocation } from 'react-router-dom'; import { PageLayout } from '@/components/Layout/PageLayout'; import { colors } from '@/theme/foundations/colors'; import { useColorModeValue } from '@/components/ui/color-mode'; export type LayoutProps = FlexProps & { children: ReactNode; }; export const PageLayoutInfoCenter = ({ children, width = '25%', ...rest }: LayoutProps) => { const { pathname } = useLocation(); useEffect(() => { window.scrollTo(0, 0); }, [pathname]); return ( {children} ); };