fix: current time widget shows build time instead of visitor's time - #714
Open
archiik04 wants to merge 1 commit into
Open
fix: current time widget shows build time instead of visitor's time#714archiik04 wants to merge 1 commit into
archiik04 wants to merge 1 commit into
Conversation
Signed-off-by: Archi Kanungo <archi.kanungo2004@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #712
The "Current Time" box on the community page showed the time the site was built, not the visitor's actual time, because
new Date()ran once on the build server. This PR wraps the clock formatting in a statefulClockcomponent and renders it client-side with<BrowserOnly>, updating the time in real-time.Before screenshot
Live Production Site (time stays frozen at 06:40):
First check:

Several minutes later (still shows 06:40):

After screenshot
Local Site (time updates dynamically):
Initial load (shows 06:40):

One minute later (advances to 06:41):

Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
git commit -s).