retrait compteur dans alert et recentre profile
This commit is contained in:
parent
9026a81680
commit
13dfa6cd95
@ -23,8 +23,9 @@ interface AlertProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function GreenAlert ({handleClose, text}: AlertProps){
|
function GreenAlert ({handleClose, text}: AlertProps){
|
||||||
|
{setTimeout(handleClose, 1500)}
|
||||||
return(
|
return(
|
||||||
|
|
||||||
<Backdrop onClick={handleClose}>
|
<Backdrop onClick={handleClose}>
|
||||||
<motion.div
|
<motion.div
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
@ -37,7 +38,6 @@ function GreenAlert ({handleClose, text}: AlertProps){
|
|||||||
<AiOutlineCheckCircle/>
|
<AiOutlineCheckCircle/>
|
||||||
<p>{text}</p>
|
<p>{text}</p>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
{setTimeout(handleClose, 1500)}
|
|
||||||
</Backdrop>
|
</Backdrop>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,7 @@ interface AlertProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function RedAlert ({handleClose, text}: AlertProps) {
|
function RedAlert ({handleClose, text}: AlertProps) {
|
||||||
|
{setTimeout(handleClose, 1500)}
|
||||||
return(
|
return(
|
||||||
<Backdrop onClick={handleClose}>
|
<Backdrop onClick={handleClose}>
|
||||||
<motion.div
|
<motion.div
|
||||||
@ -36,7 +37,6 @@ function RedAlert ({handleClose, text}: AlertProps) {
|
|||||||
<BiErrorCircle/>
|
<BiErrorCircle/>
|
||||||
<p>{text}</p>
|
<p>{text}</p>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
{setTimeout(handleClose, 1500)}
|
|
||||||
</Backdrop>
|
</Backdrop>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,6 +25,7 @@ interface AlertProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function YellowAlert ({handleClose, text, icon}: AlertProps) {
|
function YellowAlert ({handleClose, text, icon}: AlertProps) {
|
||||||
|
{setTimeout(handleClose, 3000)}
|
||||||
return(
|
return(
|
||||||
<Backdrop onClick={handleClose}>
|
<Backdrop onClick={handleClose}>
|
||||||
<motion.div
|
<motion.div
|
||||||
@ -53,7 +54,6 @@ function YellowAlert ({handleClose, text, icon}: AlertProps) {
|
|||||||
|
|
||||||
<h5>{text}</h5>
|
<h5>{text}</h5>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
{setTimeout(handleClose, 3000)}
|
|
||||||
</Backdrop>
|
</Backdrop>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,10 +3,10 @@
|
|||||||
/* ::: :::::::: */
|
/* ::: :::::::: */
|
||||||
/* Home.tsx :+: :+: :+: */
|
/* Home.tsx :+: :+: :+: */
|
||||||
/* +:+ +:+ +:+ */
|
/* +:+ +:+ +:+ */
|
||||||
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
|
/* By: sadjigui <sadjigui@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/06/09 08:19:04 by apommier #+# #+# */
|
/* 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",
|
// backdropFilter: move ? "blur(10px)" : "none",
|
||||||
// WebkitBackdropFilter: 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}}>
|
transition={{type: "tween", duration: 0.5}}>
|
||||||
<Profile/>
|
<Profile/>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user