Skip to content

Commit e193166

Browse files
committed
bugs fixing
1 parent 6e92104 commit e193166

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ Feel free to connect, collaborate, or reach out regarding projects and opportuni
7171

7272
## License
7373
Copyright © 2026 Jinal. All rights reserved.
74-
This repository is public for viewing and reference only. No part of it may be copied, modified, or redistributed without written permission.
74+
This repository is public for viewing and reference only.
75+
No part of it may be copied, modified, or redistributed without written permission.

‎src/App.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ function Contact() {
6868
const [state, setState] = useState<'idle' | 'sending' | 'ok'>('idle')
6969
const layers = useMemo(() => [[1, 700, '50s'], [2, 200, '100s'], [3, 100, '150s']].map(([w, n, t]) => ({ '--s': shadows(n as number), '--t': t, width: w + 'px', height: w + 'px' }) as CSSProperties), [])
7070
async function submit(e: FormEvent<HTMLFormElement>) {
71-
e.preventDefault(); setState('sending')
72-
const fd = new FormData(e.currentTarget)
71+
e.preventDefault();
72+
const form = e.currentTarget
73+
setState('sending')
74+
const fd = new FormData(form)
7375
try {
7476
if (!KEY) throw new Error('no key')
7577
fd.append('access_key', KEY)
@@ -81,7 +83,8 @@ function Contact() {
8183
g.append('entry.1104091493', String(fd.get('subject'))); g.append('entry.179987403', String(fd.get('message')))
8284
await fetch(GFORM, { method: 'POST', mode: 'no-cors', body: g }).catch(() => {})
8385
}
84-
e.currentTarget.reset(); setState('ok')
86+
form.reset()
87+
setState('ok')
8588
}
8689
const field = (name: string, label: string, area = false) => <div className="fc">
8790
{area ? <textarea name={name} rows={4} required /> : <input name={name} type={name === 'email' ? 'email' : 'text'} required />}

0 commit comments

Comments
 (0)