// Server Side Component compatibility (specifying this cannot be used as such) // https://beta.nextjs.org/docs/rendering/server-and-client-components#third-party-packages 'use client'; import { useEffect, useState } from 'react'; export default function DevToolsButton({ pos, }: { pos: DevToolsPosition | null | undefined; }) { // do not fail hydration with SSR - this is client only const [enable, setEnable] = useState(false); useEffect(() => { if ( typeof window !== 'undefined' && (window as any).__REDUX_DEVTOOLS_EXTENSION__ ) setEnable(true); }, []); if (!enable || !pos) return null; return (