Skip to content

Commit

Permalink
Fix item delete function typing
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardLinS committed May 27, 2024
1 parent 6b86462 commit 16c846f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type CategoryItemProps = {
title: string;
visibility?: boolean;
pages: number;
onDeleteCategory: (categoryId: string) => void;
onDeleteCategory: (categoryId: string) => Promise<void>;
};

const CategoryItem: React.FC<CategoryItemProps> = ({ id, title, pages, onDeleteCategory }) => {
Expand Down Expand Up @@ -92,7 +92,7 @@ const CategoryItem: React.FC<CategoryItemProps> = ({ id, title, pages, onDeleteC
export const CategoryContainer: React.FC<{
items: Category[];
type: string;
onDeleteCategory: (categoryId: string) => Promise<void> | void;
onDeleteCategory: (categoryId: string) => Promise<void>;
}> = ({ items: categories, type, onDeleteCategory }) => {
return (
<table>
Expand Down

0 comments on commit 16c846f

Please sign in to comment.