Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
How to set the value of a state variable in React on running "npm run deploy" in order to get the last updated time

I have a footer component that displays the last updated time to indicate when then website was last updated. That part of it looks like this:

<Typography
    variant="body1"
    noWrap
    component="div"
    sx={{ flexGrow: 1 }}
>
    This website was last updated on: {time}
</Typography> 

When I run npm run deploy in order to deploy the app to GitHub Pages, I want this {time} variable to update with the current time to accurately reflect the last updated time, just before the deploy scripts run. How would I accomplish such a thing?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!