Skip to content

Commit

Permalink
Resolve unnecessary assertion error
Browse files Browse the repository at this point in the history
  • Loading branch information
LillianHo5 committed May 27, 2024
1 parent 3529922 commit 6657f18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin-portal-frontend/src/app/all-page/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down
2 changes: 1 addition & 1 deletion admin-portal-frontend/src/app/emergencies/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down
2 changes: 1 addition & 1 deletion admin-portal-frontend/src/app/general-principles/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit 6657f18

Please sign in to comment.