Skip to content

Commit

Permalink
Merge pull request #421 from Leetfs/main
Browse files Browse the repository at this point in the history
fix(components/Form.jsx): Change button type to 'submit' for proper form submission
  • Loading branch information
IgorKowalczyk authored Nov 3, 2024
2 parents 6881d23 + f9927ef commit 65f5cce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function Form() {
<label htmlFor="input" className="flex justify-center">
<span className="sr-only">Github Username</span>
<input id="input" type="name" className={`${isInvalid ? "border-red-400 bg-red-400/10 text-red-400 placeholder:!text-red-400" : "border-white/20"} rounded-lg border bg-white/10 px-4 py-2 text-white outline-none duration-200 placeholder:text-white motion-reduce:transition-none`} placeholder="Enter your Github username" onChange={changeText} />
<button className="!focus:bg-white ml-2 flex items-center justify-center rounded-lg border border-white/20 bg-white/10 px-4 py-2 text-white outline-none duration-200 hover:bg-white/20 disabled:cursor-not-allowed disabled:opacity-60 motion-reduce:transition-none" disabled={loading || isInvalid || !input || input.length < 3} type="button">
<button className="!focus:bg-white ml-2 flex items-center justify-center rounded-lg border border-white/20 bg-white/10 px-4 py-2 text-white outline-none duration-200 hover:bg-white/20 disabled:cursor-not-allowed disabled:opacity-60 motion-reduce:transition-none" disabled={loading || isInvalid || !input || input.length < 3} type="submit">
{loading ? (
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="currentColor" className="inline-block size-6 animate-spin text-white">
<path strokeLinecap="round" strokeLinejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" />
Expand Down

0 comments on commit 65f5cce

Please sign in to comment.