-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(change-requests): prevent incorrect scheduled changes warning #3593
fix(change-requests): prevent incorrect scheduled changes warning #3593
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
@@ -19,10 +19,11 @@ const ExistingChangeRequestAlert: FC<ExistingChangeRequestAlertType> = ({ | |||
environmentId, | |||
feature_id: featureId, | |||
}) | |||
const date = useRef(moment().toISOString()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that it was necessary (thanks to an assist from @kyle-ssg) to move this out to useRef
to avoid an infinite recursion caused by the date being calculated on each re-render.
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
The FE shows the following warning based on the logic changed as part of this PR. I can't see any reason why it should use the start of the current hour instead of the current time so I have removed the
startOf('hour')
clause.How did you test this code?
Tested using the vercel previews.