-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Bug] Fix link from Help Center to Agency Dashboards for production users #1068
Conversation
import React, { PropsWithChildren } from "react"; | ||
|
||
import { useStore } from "../../stores"; | ||
|
||
export const LinkToPublisher: React.FC< | ||
PropsWithChildren & { publisherPath: string } | ||
> = ({ publisherPath, children }) => { | ||
> = observer(({ publisherPath, children }) => { |
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.
Wrapping these components with the observer
higher-order component is the only change in this PR - the rest is prettier formatting.
Yeah since playtesting links are technically staging, this makes sense. So hopefully this change is all that is needed once deployed to prod! |
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.
lgtm!
Thank you so much, Michelle! Yeah, I was hoping for the one without the |
Description of the change
I noticed a bug when I was playing around with the Help Center in production specifically in the link to Agency Dashboards. I was taken to the staging URL which resulted in an error - instead of the production URL. For some reason the piece of logic that creates the URL based on the environment isn't picking up on the right environment. I suspect it is because when this component is mounted, the
api.environment
is firstundefined
until it is set - and since these components aren'tobserver
s they might not have been re-rendering whenapi.environment
is set and have thus defaulted to the staging URL.I tried to log the
api.environment
and deploy to playtesting with and without theobserver
and it loggedstaging
for both - so my hunch might be off. But regardless, both components should be wrapped in anobserver
- so this change is necessary. I am curious to see when we deploy to prod if this fixes it. If not, I'll keep digging into this.Related issues
Closes #1067
Checklists
Development
This box MUST be checked by the submitter prior to merging:
These boxes should be checked by the submitter prior to merging:
Code review
These boxes should be checked by reviewers prior to merging: