-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Our use of <TimeAgo/> is slightly wonky with SSR:
cloudflare-docs-engine/src/components/docs-tutorials.js
Lines 89 to 93 in 6faa9d1
| <TimeAgo date={tutorial.updated} formatter={(value, unit) => ( | |
| <React.Fragment> | |
| {value} {unit}{value > 1 ? "s" : ""}<span className="DocsTutorials--ago-text"> ago</span> | |
| </React.Fragment> | |
| )} minPeriod={60}/> |
It can flash "N hours ago" and then switch to "3 days ago" on page load for example. This is because the SSR time will be locked in at the last time it was built, but upon hydration it will be from now.
We could potentially use HTMLRewriter to set on the fly.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working