refactor: clean code

This commit is contained in:
Fu Diwei
2024-10-22 11:38:55 +08:00
parent 18a7bf0d66
commit 716f5f1426
26 changed files with 63 additions and 60 deletions

View File

@@ -9,7 +9,7 @@ import { useToast } from "@/components/ui/use-toast";
import { getErrMessage } from "@/lib/error";
import { NotifyChannels, NotifyChannelTelegram } from "@/domain/settings";
import { update } from "@/repository/settings";
import { useNotify } from "@/providers/notify";
import { useNotifyContext } from "@/providers/notify";
import { notifyTest } from "@/api/notify";
import Show from "@/components/Show";
@@ -20,7 +20,7 @@ type TelegramSetting = {
};
const Telegram = () => {
const { config, setChannels } = useNotify();
const { config, setChannels } = useNotifyContext();
const { t } = useTranslation();
const [changed, setChanged] = useState<boolean>(false);
@@ -244,4 +244,3 @@ const Telegram = () => {
};
export default Telegram;