I'm setting up an online dashboard for monitoring whether hardware is operational or not. This information is shown in a table. It would say when the hardware was 'last seen'.
I am able to get the date/time 'last seen' data in this format: 2022-05-25 12:15
The data becomes a table that won't inherently have any IDs.
What I would like to do is have the text 2022-05-25 12:15 change colour based on how long ago it was from the present time. For example, if it was 'last seen' more than ten minutes ago, the text would turn red to alert people that it needs to be checked out.
I am not handling the backend of this project, just the frontend.
How would I be able to change the colour of the text in the value based on how long ago it was?
Thanks!