Skip to content

Commit

Permalink
fix uplaoding button glitch after deleting facility avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
rajku-dev committed Feb 11, 2025
1 parent a794120 commit d94134d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Facility/FacilityHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,13 @@ export const FacilityHome = ({ facilityId }: Props) => {
},
);
};
const handleCoverImageDelete = async (onError: () => void) => {
const handleCoverImageDelete = async (
onSuccess: () => void,
onError: () => void,
) => {
try {
await deleteAvatar();
onSuccess();
} catch {
onError();
}
Expand Down

0 comments on commit d94134d

Please sign in to comment.