import { Label } from '@/components/ui/label' import { Switch } from '@/components/ui/switch' import storage from '@/services/local-storage.service' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' export default function PublishSuccessToastSetting() { const { t } = useTranslation() const [enabled, setEnabled] = useState(true) useEffect(() => { setEnabled(storage.getShowPublishSuccessToasts()) }, []) const onChange = (checked: boolean) => { setEnabled(checked) storage.setShowPublishSuccessToasts(checked) } return (