diff --git a/admin-portal-frontend/src/app/all-page/page.tsx b/admin-portal-frontend/src/app/all-page/page.tsx index c6c2e9b..ce3b72e 100644 --- a/admin-portal-frontend/src/app/all-page/page.tsx +++ b/admin-portal-frontend/src/app/all-page/page.tsx @@ -20,7 +20,7 @@ export default function CategoriesPage() { useEffect(() => { const fetchData = async () => { try { - const fetchedCategories = (await getAllCategories()) as Category[]; + const fetchedCategories = await getAllCategories(); setCategories(fetchedCategories as never); } catch (error) { console.log("Fetch categories failed."); diff --git a/admin-portal-frontend/src/app/emergencies/page.tsx b/admin-portal-frontend/src/app/emergencies/page.tsx index 8bd7cd6..b03217d 100644 --- a/admin-portal-frontend/src/app/emergencies/page.tsx +++ b/admin-portal-frontend/src/app/emergencies/page.tsx @@ -13,7 +13,7 @@ export default function CategoriesPage() { useEffect(() => { const fetchData = async () => { try { - const fetchedCategories = (await getAllCategories()) as Category[]; + const fetchedCategories = await getAllCategories(); setCategories(fetchedCategories as never); } catch (error) { console.log("Fetch categories failed."); diff --git a/admin-portal-frontend/src/app/general-principles/page.tsx b/admin-portal-frontend/src/app/general-principles/page.tsx index 88b6908..5f27ba5 100644 --- a/admin-portal-frontend/src/app/general-principles/page.tsx +++ b/admin-portal-frontend/src/app/general-principles/page.tsx @@ -13,7 +13,7 @@ export default function CategoriesPage() { useEffect(() => { const fetchData = async () => { try { - const fetchedCategories = (await getAllCategories()) as Category[]; + const fetchedCategories = await getAllCategories(); setCategories(fetchedCategories as never); } catch (error) { console.log("Fetch categories failed.");