From efbd7750540fd0ceb34b5ece9990c9058700f085 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Mon, 6 Jan 2025 01:57:11 +0100 Subject: [PATCH] fix(frontend): remove duplicated type declarations --- frontend/src/hooks/crud/useCreate.tsx | 7 +++---- frontend/src/hooks/crud/useDelete.tsx | 7 +++---- frontend/src/hooks/crud/useDeleteMany.tsx | 7 +++---- frontend/src/hooks/crud/useUpdate.tsx | 7 +++---- frontend/src/hooks/crud/useUpdateMany.tsx | 7 +++---- frontend/src/hooks/crud/useUpload.tsx | 7 +++---- 6 files changed, 18 insertions(+), 24 deletions(-) diff --git a/frontend/src/hooks/crud/useCreate.tsx b/frontend/src/hooks/crud/useCreate.tsx index 63871223..2319d689 100644 --- a/frontend/src/hooks/crud/useCreate.tsx +++ b/frontend/src/hooks/crud/useCreate.tsx @@ -1,11 +1,12 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ + import { useMutation, useQueryClient } from "react-query"; import { QueryType, TMutationOptions } from "@/services/types"; @@ -25,9 +26,7 @@ export const useCreate = < options?: Omit< TMutationOptions, "mutationFn" | "mutationKey" - > & { - invalidate?: boolean; - }, + >, ) => { const api = useEntityApiClient(entity); const queryClient = useQueryClient(); diff --git a/frontend/src/hooks/crud/useDelete.tsx b/frontend/src/hooks/crud/useDelete.tsx index 1becb844..62e77d25 100644 --- a/frontend/src/hooks/crud/useDelete.tsx +++ b/frontend/src/hooks/crud/useDelete.tsx @@ -1,11 +1,12 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ + import { useMutation, useQueryClient } from "react-query"; import { QueryType, TMutationOptions } from "@/services/types"; @@ -30,9 +31,7 @@ export const useDelete = < options?: Omit< TMutationOptions, "mutationFn" | "mutationKey" - > & { - invalidate?: boolean; - }, + >, ) => { const api = useEntityApiClient(entity); const queryClient = useQueryClient(); diff --git a/frontend/src/hooks/crud/useDeleteMany.tsx b/frontend/src/hooks/crud/useDeleteMany.tsx index d4786a37..0a42d2ea 100644 --- a/frontend/src/hooks/crud/useDeleteMany.tsx +++ b/frontend/src/hooks/crud/useDeleteMany.tsx @@ -1,11 +1,12 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ + import { useMutation, useQueryClient } from "react-query"; import { QueryType, TMutationOptions } from "@/services/types"; @@ -25,9 +26,7 @@ export const useDeleteMany = < options?: Omit< TMutationOptions, "mutationFn" | "mutationKey" - > & { - invalidate?: boolean; - }, + >, ) => { const api = useEntityApiClient(entity); const queryClient = useQueryClient(); diff --git a/frontend/src/hooks/crud/useUpdate.tsx b/frontend/src/hooks/crud/useUpdate.tsx index c0c0b90e..2c2e7552 100644 --- a/frontend/src/hooks/crud/useUpdate.tsx +++ b/frontend/src/hooks/crud/useUpdate.tsx @@ -1,11 +1,12 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ + import { useMutation, useQueryClient } from "react-query"; import { QueryType, TMutationOptions, TSetCacheProps } from "@/services/types"; @@ -37,9 +38,7 @@ export const useUpdate = < TBasic >, "mutationFn" | "mutationKey" - > & { - invalidate?: boolean; - }, + >, ) => { const api = useEntityApiClient(entity); const normalizeAndCache = useNormalizeAndCache(entity); diff --git a/frontend/src/hooks/crud/useUpdateMany.tsx b/frontend/src/hooks/crud/useUpdateMany.tsx index 4a283485..29be8bba 100644 --- a/frontend/src/hooks/crud/useUpdateMany.tsx +++ b/frontend/src/hooks/crud/useUpdateMany.tsx @@ -1,11 +1,12 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ + import { useMutation, useQueryClient } from "react-query"; import { QueryType, TMutationOptions } from "@/services/types"; @@ -33,9 +34,7 @@ export const useUpdateMany = < TBasic >, "mutationFn" | "mutationKey" - > & { - invalidate?: boolean; - }, + >, ) => { const api = useEntityApiClient(entity); const queryClient = useQueryClient(); diff --git a/frontend/src/hooks/crud/useUpload.tsx b/frontend/src/hooks/crud/useUpload.tsx index 357c97b5..bd494893 100644 --- a/frontend/src/hooks/crud/useUpload.tsx +++ b/frontend/src/hooks/crud/useUpload.tsx @@ -1,11 +1,12 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ + import { useMutation, useQueryClient } from "react-query"; import { QueryType, TMutationOptions } from "@/services/types"; @@ -25,9 +26,7 @@ export const useUpload = < options?: Omit< TMutationOptions, "mutationFn" | "mutationKey" - > & { - invalidate?: boolean; - }, + >, ) => { const api = useEntityApiClient(entity); const queryClient = useQueryClient();