2024-08-06 22:18:07 -04:00
|
|
|
import { useRecoilState } from 'recoil';
|
|
|
|
|
import { Switch } from '~/components/ui';
|
|
|
|
|
import { useLocalize } from '~/hooks';
|
|
|
|
|
import store from '~/store';
|
|
|
|
|
|
|
|
|
|
export default function AtCommandSwitch() {
|
|
|
|
|
const [atCommand, setAtCommand] = useRecoilState<boolean>(store.atCommand);
|
|
|
|
|
const localize = useLocalize();
|
|
|
|
|
|
|
|
|
|
const handleCheckedChange = (value: boolean) => {
|
|
|
|
|
setAtCommand(value);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex items-center justify-between">
|
|
|
|
|
<div>{localize('com_nav_at_command_description')}</div>
|
|
|
|
|
<Switch
|
|
|
|
|
id="atCommand"
|
|
|
|
|
checked={atCommand}
|
|
|
|
|
onCheckedChange={handleCheckedChange}
|
2024-10-20 17:29:47 +02:00
|
|
|
className="ml-4"
|
2024-08-06 22:18:07 -04:00
|
|
|
data-testid="atCommand"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|