Skip to content

Commit 89057b4

Browse files
committed
save
1 parent acaa4b9 commit 89057b4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/components/Footer/Footer.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import PureFooter from "./PureFooter/PureFooter.tsx"
44
import i18next from "i18next"
55
---
66

7-
<!-- // test -->
87
<div>
98
<Subscribe client:idle lang={i18next.language} />
109
<PureFooter />

src/components/Footer/Subscribe/Subscribe.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@ 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
i18next.changeLanguage(props.lang)
2425

26+
useEffect(() => {
27+
setTimeout(() => {
28+
setKey(key + 1)
29+
}, 10000)
30+
}, [props.lang])
31+
2532
useEffect(() => {
2633
setCustomMessage("")
2734
setEmailValid(isValidEmail(email))
@@ -43,7 +50,7 @@ export default function Subscribe(props) {
4350
}
4451

4552
return (
46-
<div className={clsx(styles.container, "dark:bg-dark-highlight")}>
53+
<div key={key} className={clsx(styles.container, "dark:bg-dark-highlight")}>
4754
<div className={styles.subscribeBox}>
4855
<span className="text-white dark:text-black bg-black dark:bg-white rounded-[50%]">
4956
<SubscribeSvg></SubscribeSvg>

0 commit comments

Comments
 (0)