This adds a step to our github/workflows/deploy.yml which outputs the current date. The current date is then assigned to an ENV var which is read by getStaticProps. The last updated date is then displayed below the record count on the /courses page.
Screenshot
How To Test
REACT_APP_LAST_UPDATED=$(date +'%Y-%m-%d') npm run dev
Visit /courses and you should see Last Updated below record count
Description
This adds a step to our github/workflows/deploy.yml which outputs the current date. The current date is then assigned to an ENV var which is read by getStaticProps. The last updated date is then displayed below the record count on the /courses page.
Screenshot
How To Test
REACT_APP_LAST_UPDATED=$(date +'%Y-%m-%d') npm run dev
Visit/courses
and you should see Last Updated below record countHelpful links
https://stackoverflow.com/a/60942437 https://tpsdsa.slack.com/archives/C24UW7AE4/p1681325730682899?thread_ts=1681233802.690859&cid=C24UW7AE4