hackutd / jury

An all-in-one hackathon judging platform, created with modern technologies aimed at optimizing the user experience of hackers, judges, and organizers.
https://jury.mikz.dev
MIT License
9 stars 12 forks source link

Custom Alerts #100

Open MichaelZhao21 opened 4 months ago

MichaelZhao21 commented 4 months ago

Describe the feature you'd like

I would like to have custom alert popups instead of using the browser's default alert() feature.

Pre-existing Issue or Justification

Whenever we have a backend call, we need to send an alert to the user when it succeeds. I would love if we could have a nice-looking alert box!

Additional context

I'm thinking this should be something that could be added to a page, with an alertOpen and alertText state variable.

<Alert text={alertText} open={alertOpen} setOpen={setAlertOpen} />

Another option for implementation is to have this as a global component and use the zustand store which can update a global state variable and show the alert. (lowkey like this one better but it is harder)

vvyn commented 3 months ago

Fade in from slightly below and then fade upwards - Mikey