import { useEffect, useState } from 'react' import { RefreshClockwiseIcon } from './icons' import { defaultLayouts } from './TradePageGrid' import useLocalStorageState from '../hooks/useLocalStorageState' import Tooltip from './Tooltip' const ResetLayout = ({ className = '' }) => { const [spin, setSpin] = useState(false) const [, setSavedLayouts] = useLocalStorageState( 'savedLayouts', defaultLayouts ) useEffect(() => { const timer = setTimeout(() => { setSpin(false) }, 500) return () => clearTimeout(timer) }, [spin]) const handleResetLayout = () => { setSavedLayouts(defaultLayouts) setSpin(true) } return (