retrait compteur dans alert et recentre profile

This commit is contained in:
Elisee ADJIGUIDI 2023-06-26 04:04:51 +02:00
parent 9026a81680
commit 13dfa6cd95
4 changed files with 7 additions and 7 deletions

View File

@ -23,8 +23,9 @@ interface AlertProps {
}
function GreenAlert ({handleClose, text}: AlertProps){
{setTimeout(handleClose, 1500)}
return(
<Backdrop onClick={handleClose}>
<motion.div
onClick={(e) => e.stopPropagation()}
@ -37,7 +38,6 @@ function GreenAlert ({handleClose, text}: AlertProps){
<AiOutlineCheckCircle/>
<p>{text}</p>
</motion.div>
{setTimeout(handleClose, 1500)}
</Backdrop>
)
}

View File

@ -23,6 +23,7 @@ interface AlertProps {
}
function RedAlert ({handleClose, text}: AlertProps) {
{setTimeout(handleClose, 1500)}
return(
<Backdrop onClick={handleClose}>
<motion.div
@ -36,7 +37,6 @@ function RedAlert ({handleClose, text}: AlertProps) {
<BiErrorCircle/>
<p>{text}</p>
</motion.div>
{setTimeout(handleClose, 1500)}
</Backdrop>
)
}

View File

@ -25,6 +25,7 @@ interface AlertProps {
}
function YellowAlert ({handleClose, text, icon}: AlertProps) {
{setTimeout(handleClose, 3000)}
return(
<Backdrop onClick={handleClose}>
<motion.div
@ -53,7 +54,6 @@ function YellowAlert ({handleClose, text, icon}: AlertProps) {
<h5>{text}</h5>
</motion.div>
{setTimeout(handleClose, 3000)}
</Backdrop>
)
}

View File

@ -3,10 +3,10 @@
/* ::: :::::::: */
/* Home.tsx :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* By: sadjigui <sadjigui@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/06/09 08:19:04 by apommier #+# #+# */
/* Updated: 2023/06/24 23:26:45 by apommier ### ########.fr */
/* Updated: 2023/06/26 04:03:16 by sadjigui ### ########.fr */
/* */
/* ************************************************************************** */
@ -243,7 +243,7 @@ function Home () {
// backdropFilter: move ? "blur(10px)" : "none",
// WebkitBackdropFilter: move ? "blur(10px)" : "none"
// }}
animate={{x: move ? '-50%' : '30%'}}
animate={{x: move ? '-50%' : '25%'}}
transition={{type: "tween", duration: 0.5}}>
<Profile/>
</motion.div>