diff --git a/frontend/composables/api/blog/useGetArticles.ts b/frontend/composables/api/blog/useGetArticles.ts index 0ccfde0..91d1f61 100644 --- a/frontend/composables/api/blog/useGetArticles.ts +++ b/frontend/composables/api/blog/useGetArticles.ts @@ -5,11 +5,11 @@ import { API_ENDPOINTS, QUERY_KEYS } from "~/constants"; // types -export type GetArticlesResponse = ApiPaginated; +export type GetArticlesResponse = ApiPaginated
; const useGetArticles = ( page: Ref, - search: Ref + search?: Ref ) => { // state @@ -23,7 +23,7 @@ const useGetArticles = ( params: { offset: (page.value * 10) - 10, limit: 10, - search: search.value.length > 0 ? search.value : undefined, + search: search ? (search.value.length > 0 ? search.value : undefined) : undefined, } }); return data;