Skip to content

Commit 9a09ce7

Browse files
committed
save
1 parent c4cd4f2 commit 9a09ce7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/Footer/Subscribe/Subscribe.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ export default function Subscribe(props) {
1919
const [email, setEmail] = useState("")
2020
const [customMessage, setCustomMessage] = useState("")
2121
const [emailValid, setEmailValid] = useState(false)
22+
const [key, setKey] = useState(0)
2223

2324

2425
useEffect(() => {
2526
setTimeout(() => {
26-
setEmail("")
27-
}, 3000)
27+
setKey(key + 1)
28+
}, 300)
2829
}, [props.lang])
2930

3031
useEffect(() => {
@@ -48,7 +49,7 @@ export default function Subscribe(props) {
4849
}
4950

5051
return (
51-
<div className={clsx(styles.container, "dark:bg-dark-highlight")}>
52+
<div key={key} className={clsx(styles.container, "dark:bg-dark-highlight")}>
5253
<div className={styles.subscribeBox}>
5354
<span className="text-white dark:text-black bg-black dark:bg-white rounded-[50%]">
5455
<SubscribeSvg></SubscribeSvg>

0 commit comments

Comments
 (0)