12products / website

A website to document the products and process of building.
12products.vercel.app
1 stars 1 forks source link

Incorrect countdown on Sundays #1

Open amorriscode opened 2 years ago

amorriscode commented 2 years ago

We have a counter that counts down to the next live stream but if the stream has started (eg. it is 12:30 PST) then the countdown says the next stream is 30 minutes from now. In fact, it's 30 minutes in the past.

image

☝🏻 This is what the website shows at 12:06 PM PST.

What we actually want is to say that we've been long for X amount of time. If it is past 2 PM PST, then we'll display "next stream" again.

Pascal488 commented 2 years ago

Hey there hope you're doing fine Am a newbie and i understand what needed to be fixed but the problem is i do not know where i should start can you direct me maybe there is a contribution guideline. This will be my second contribution...hope so

amorriscode commented 2 years ago

Hey @Pascal488! Thanks for your interest. Sorry we don't have a contribution guideline. I'll work on adding one in the future.

For now, you can start by taking look at the getNextStreamText function. This is how we calculate the time until the next stream.

If it's Sunday and the stream has started, we'd like it to say "Stream started 6 minutes ago" or something along those lines.

Let me know if you need any clarification!