terencehuynh / can-i-leave-melbourne

can i leave dot melbourne
https://canileave.melbourne
7 stars 2 forks source link

Add a Last Updated date / Versioning #5

Open terencehuynh opened 4 years ago

terencehuynh commented 4 years ago

Would be nice to include a last updated date so that people know when it was last updated, in case new restrictions get applied and we may not have the updated version when a person visited it.

Remakh commented 4 years ago

mind if I try?

terencehuynh commented 4 years ago

Yeah sure @Remakh

Remakh commented 4 years ago

I'm a bit stuck. I have used react in the past, but in nextjs you don't pass state to components or handle change? I tried using document.lastModified, but it's a bit buggy since nextjs does server-side rendering.

terencehuynh commented 4 years ago

Hi @Remakh, apologies in not getting back to you sooner. You could also try generating a file based on the git commit and have the site read it from said file?