use onChange instead of onClick on checkbox to remove react warning

This commit is contained in:
MarconLP 2023-04-21 23:32:41 +02:00
parent 568e58d6a0
commit 1369474233
No known key found for this signature in database
GPG key ID: A08A9C8B623F5EA5

View file

@ -85,7 +85,7 @@ export default function Paywall() {
<span className=" svelte-10wstod">Monthly</span>
<label className="group relative flex cursor-pointer items-center gap-2 text-sm font-medium text-gray-600">
<input
onClick={() => setBilledAnnually(!billedAnnually)}
onChange={() => setBilledAnnually(!billedAnnually)}
checked={billedAnnually}
type="checkbox"
className="peer absolute left-1/2 hidden h-full w-full -translate-x-1/2 rounded-md"