Skip to content

Commit d02652f

Browse files
committed
if username is empty
1 parent f3ca371 commit d02652f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/components/LeetCodeWrapped.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const LeetCodeWrapped = () => {
123123

124124
<div className=' flex items-center justify-center'>
125125
<input onChange={handleInputChange} type="text" placeholder="Generate Your LeetCode-Wrap" className="my-2 w-[250px] input input-bordered input-warning " />
126-
<button disabled={loading} onClick={handleSubmit} className="btn btn-outline btn-accent ml-3">Generate</button>
126+
<button disabled={loading} onClick={handleSubmit} className={`${userName.trim() === '' ? 'pointer-events-none opacity-50' : ''}btn btn-outline btn-accent ml-3`}>Generate</button>
127127
</div>
128128

129129
{/* Community Stat */}

0 commit comments

Comments
 (0)