import { ChangeEvent, useCallback } from 'react' import { Switch } from '@janhq/joi' import { useAtom } from 'jotai' import { atomWithStorage } from 'jotai/utils' const COPY_OVER_INSTRUCTION_ENABLED = 'copy_over_instruction_enabled' export const copyOverInstructionEnabledAtom = atomWithStorage( COPY_OVER_INSTRUCTION_ENABLED, false ) const CopyOverInstruction: React.FC = () => { const [copyOverInstructionEnabled, setCopyOverInstructionEnabled] = useAtom( copyOverInstructionEnabledAtom ) const onSwitchToggled = useCallback( (e: ChangeEvent) => { setCopyOverInstructionEnabled(e.target.checked) }, [setCopyOverInstructionEnabled] ) return (
Save instructions for new threads
) } export default CopyOverInstruction