import { useRef } from 'react'; import { Flex } from '@chakra-ui/react'; import { useConfig, useColorValue } from '~/context'; import { If, Debugger, Greeting, Footer, Header } from '~/components'; import { useLGState } from '~/hooks'; import type { TFrame } from './types'; export const Frame = (props: TFrame) => { const { developer_mode } = useConfig(); const { isSubmitting, resetForm } = useLGState(); const bg = useColorValue('white', 'black'); const color = useColorValue('black', 'white'); const containerRef = useRef({} as HTMLDivElement); function handleReset(): void { containerRef.current.scrollIntoView({ behavior: 'smooth', block: 'start' }); isSubmitting.set(false); resetForm(); } return ( <>