-
+
{mode === 'announcement' && (
-
+
)}
diff --git a/src/pages/Admin/hooks/index.ts b/src/pages/Admin/hooks/index.ts
index 44a8e2d..a860a06 100644
--- a/src/pages/Admin/hooks/index.ts
+++ b/src/pages/Admin/hooks/index.ts
@@ -3,3 +3,4 @@ export * from './useSelectUserPrivilege';
export * from './useAdminAnnouncementsTable';
export * from './useAdminAllClassesTable';
export * from './useAdminAllProblemsTable';
+export * from './useAdminFaqsTable';
diff --git a/src/pages/Admin/hooks/query/index.ts b/src/pages/Admin/hooks/query/index.ts
index a29e6cf..e896834 100644
--- a/src/pages/Admin/hooks/query/index.ts
+++ b/src/pages/Admin/hooks/query/index.ts
@@ -8,3 +8,6 @@ export * from './useAdminAllProblemsQuery';
export * from './useCreateAnnouncementMutation';
export * from './useEditAnnouncementMutation';
export * from './useAdminAnnouncementQuery';
+export * from './useDeleteFaqMutation';
+export * from './useEditFaqVisibleMutation';
+export * from './useAdminFaqListQuery';
diff --git a/src/pages/Admin/hooks/query/useAdminFaqListQuery.ts b/src/pages/Admin/hooks/query/useAdminFaqListQuery.ts
new file mode 100644
index 0000000..e22b03e
--- /dev/null
+++ b/src/pages/Admin/hooks/query/useAdminFaqListQuery.ts
@@ -0,0 +1,28 @@
+import { UseQueryOptions } from 'react-query';
+import { AxiosError } from 'axios';
+
+import { QUERY_KEYS } from '@/constants';
+import { useSuspenseQuery } from '@/hooks/useSuspenseQuery';
+
+import { getFaqs } from '../../api';
+
+export const useAdminFaqListQuery = (
+ keyword: string,
+ options?: UseQueryOptions<
+ AdminFaqListResponse,
+ AxiosError,
+ AdminFaqListResponse,
+ [string, string]
+ >
+) => {
+ return useSuspenseQuery(
+ [QUERY_KEYS.ADMIN_ALL_FAQS, keyword],
+ async ({ queryKey: [, keyword] }) => {
+ const { data } = await getFaqs(keyword);
+ return data;
+ },
+ {
+ ...options,
+ }
+ );
+};
diff --git a/src/pages/Admin/hooks/query/useDeleteFaqMutation.ts b/src/pages/Admin/hooks/query/useDeleteFaqMutation.ts
new file mode 100644
index 0000000..6603200
--- /dev/null
+++ b/src/pages/Admin/hooks/query/useDeleteFaqMutation.ts
@@ -0,0 +1,14 @@
+import { AxiosError, AxiosResponse } from 'axios';
+import { useMutation, UseMutationOptions } from 'react-query';
+import { deleteFaq } from '../../api';
+
+export const useDeleteFaqMutation = (
+ options?: UseMutationOptions