From 9812bfea546216d4dde6c5af0fb6af6847873ce9 Mon Sep 17 00:00:00 2001 From: Onelevenvy Date: Tue, 24 Sep 2024 18:22:06 +0800 Subject: [PATCH] fix:useSkillsQuery --- web/src/app/(applayout)/skills/page.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/web/src/app/(applayout)/skills/page.tsx b/web/src/app/(applayout)/skills/page.tsx index cd47c95..cd3255f 100644 --- a/web/src/app/(applayout)/skills/page.tsx +++ b/web/src/app/(applayout)/skills/page.tsx @@ -23,17 +23,13 @@ import { import { useTabSearchParams } from "@/hooks/useTabSearchparams"; import TabSlider from "@/components/Common/TabSlider"; import { useTranslation } from "react-i18next"; +import { useSkillsQuery } from "@/hooks/useSkillsQuery"; function Skills() { const showToast = useCustomToast(); const { t } = useTranslation(); - const { - data: skills, - isLoading, - isError, - error, - } = useQuery("skills", () => SkillsService.readSkills({})); + const { data: skills, isLoading, isError, error } = useSkillsQuery(); if (isError) { const errDetail = (error as ApiError).body?.detail; showToast("Something went wrong.", `${errDetail}`, "error");