Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

144
Vistas
How to call confetti only once
if (isApplied && moreCount === 0 && route !== cartUrl && bagCouponActive) {
    return (
      <StickyBottomFooter bottom={bottomPosition}>
        <Confetti fire />
        <FlexBox
          spacing="py24 m-py12"
          align="center"
          justify="center"
          position="row"
          fullWidth
          style={{
            background: 'var(--secondary-green)',
            height: isMobile ? '40px' : '56px',
          }}
        >
          <Text size="16_24" mobileSize="14" thickness="medium" color="white">
            Congrats! you’ve unlocked '{couponCode}' offer
          </Text>

I am using Confetti to show this but appears everytime in every refresh these need to be get call only once in the home page

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you mean only once and keep it through refreshes, you need to store somewhere information that your confetti fired, for example in localStorage/sessionStorage:

localStorage.set('fired',true)

and then just check if it was fired before

<Confetti fire={localStorage.get('fired')} />

If you want to reset this state on page refresh and keep it only though router changes and redirects, just keep this information in useState or Redux store

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda