willianjusten / nba-remix

A simple app to show NBA games and scores/details.
https://nba.willianjusten.com.br
208 stars 31 forks source link

GameCard logic refinements and data #29

Closed willianjusten closed 2 years ago

willianjusten commented 2 years ago

This issue is only to handle the logic of displaying correct periods/time of the game. It doesn't need visual yet.


The GameCard will have this visual:

image

But it has some variations as well:

The clock should appear in the middle and it should inform which quarter as well, like: Q1 - 10:34 WhatsApp Image 2022-02-11 at 11 48 27 AM


From the API, we have some parts that we can use in order to make this logic, follow a snippet from the API

startTimeUTC: '2022-02-09T00:00:00.000Z',
period: {
  current: 4,
  type: 0,
  maxRegular: 4,
  isHalftime: false,
  isEndOfPeriod: false
},