humblFINANCE / humblFINANCE-frontend

the official codebase for the humblFINANCE web app
https://humbl-finance-frontend.vercel.app
Other
2 stars 1 forks source link

[BUG]: Email Login/Sign-up Flow is broken #111

Open jjfantini opened 2 months ago

jjfantini commented 2 months ago

Overview:

When logging in with an email, there is no email-confirmation page to show that the email has been confirmed. I've added an email confirmation page in the email-confirmation branch. When I added this page, it led to other errors. Can you please add an email confirmation page to show the user that they have had an email sent to them that they need to confirm?

Please use the code below For the sign-in page.

Tasks:

  1. Add email-confirmation` page
  2. Ensure the email is sent and can be verified.

Resources:

  1. Run npx magicui-cli add confetti

  2. Add

    
    'use client'

import { useCallback } from 'react' import confetti from 'canvas-confetti'

export default function EmailConfirmationPage() { const handleMouseEnter = useCallback(() => { const duration = 5 * 1000 const animationEnd = Date.now() + duration const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: 0 }

const randomInRange = (min: number, max: number) =>
  Math.random() * (max - min) + min

const interval = setInterval(() => {
  const timeLeft = animationEnd - Date.now()

  if (timeLeft <= 0) {
    return clearInterval(interval)
  }

  const particleCount = 50 * (timeLeft / duration)
  confetti({
    ...defaults,
    particleCount,
    origin: { x: randomInRange(0.1, 0.3), y: Math.random() - 0.2 },
  })
  confetti({
    ...defaults,
    particleCount,
    origin: { x: randomInRange(0.7, 0.9), y: Math.random() - 0.2 },
  })
}, 250)

}, [])

return (

Congratulations!

We appreciate you joining! Let's build the path towards financial freedom together.

Please check your email to find the link to confirm your email.

) }