Skip to content

Commit cd82128

Browse files
committed
Refactor code: Simplify form validation in UserSubmission page
1 parent 5e0c525 commit cd82128

File tree

1 file changed

+1
-6
lines changed
  • src/app/(pages)/profile/[username]/submission/[bountyid]

1 file changed

+1
-6
lines changed

src/app/(pages)/profile/[username]/submission/[bountyid]/page.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ const UserSubmisson = () => {
4343
if (username !== user.login) {
4444
return toast.error("You are not authorized to edit this submission");
4545
}
46-
if (
47-
!submission.links.length ||
48-
!submission.notes ||
49-
!submission.walletAddress
50-
) {
46+
if (!submission.links.length || !submission.walletAddress) {
5147
toast.info("Enter All Fields");
5248
return;
5349
}
@@ -150,7 +146,6 @@ const UserSubmisson = () => {
150146
<Textarea
151147
name="notes"
152148
id="notes"
153-
required
154149
value={submission?.notes || ""}
155150
onChange={handleChange}
156151
placeholder={

0 commit comments

Comments
 (0)