Skip to content

Commit

Permalink
refactor: remove type assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-Hussein-dev committed Sep 9, 2024
1 parent ea44570 commit 938b139
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/actions/update-user-profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ export const updateUserProfile = async (
const validatedData = schema.safeParse({
name: formData.get("name"),
languages: Object.values(languages),
}) as {
data: UserProfile;
error: Record<string, string>[];
success: boolean;
};
});

if (!!validatedData.error) {
console.warn("Validation Error", validatedData.error, id);
Expand Down

0 comments on commit 938b139

Please sign in to comment.