File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments