Auth page done

This commit is contained in:
2022-04-25 17:47:24 -03:00
parent 32404d1104
commit bf31475316
17 changed files with 453 additions and 102 deletions

View File

@@ -0,0 +1,36 @@
import React from 'react'
import './notification-style.css'
const Notification = ({notification, setNotification}) => {
React.useEffect(() => {
if (notification === false) {
return
}
setTimeout(() => {
const elem = document.querySelector("#notification-element")
elem.classList.remove('fade-in')
elem.classList.add('fade-out')
}, 2000)
setTimeout(() => {
setNotification(false)
}, 2400)
}, [notification])
return (
<>
{
notification ?
<div className="notification fade-in" id="notification-element">
<p>{notification}</p>
</div>
: null
}
</>
)
}
export default Notification