File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import PureFooter from "./PureFooter/PureFooter.tsx"
44import i18next from " i18next"
55---
66
7- <!-- // test -->
87<div >
98 <Subscribe client:idle lang ={ i18next .language } />
109 <PureFooter />
Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments