-
Notifications
You must be signed in to change notification settings - Fork 3
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
Display sandbox layout to sandbox users #830
Conversation
… after completing onboarding
This pull request has been linked to Shortcut Story #23123: Create hook to check the user's account type. |
.toUpperCase(); | ||
} | ||
export const getInitials = (name: string) => { | ||
const nameArray = name?.split(' ') || ['']; |
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.
While toggling between onboarded and not onboarded user states, I kept getting an undefined error related to this function. Using optional chaining (? after name)
didn't completely resolve it, so ['']
was added as a fallback.
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.
the updated function is easier to follow as well - thanks for making this fix!
@@ -16,6 +16,8 @@ export function useUpdateProfile(): ProfileUpdateMutation { | |||
queryClient.invalidateQueries({ queryKey: [RQK.MEMBER_LIST] }); | |||
queryClient.invalidateQueries({ queryKey: [RQK.MEMBER_DETAIL] }); | |||
queryClient.invalidateQueries({ queryKey: [RQK.PROFILE] }); | |||
queryClient.invalidateQueries({ queryKey: [RQK.ORG_DETAIL] }); |
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.
This change informs React Query that the data for these queries is now stale, due to a user completing the onboarding process, and should be re-fetched.
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.
Thanks for noticing the issue and making the fix!
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.
looks good @daniellemaxwell!
.toUpperCase(); | ||
} | ||
export const getInitials = (name: string) => { | ||
const nameArray = name?.split(' ') || ['']; |
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.
the updated function is easier to follow as well - thanks for making this fix!
@@ -16,6 +16,8 @@ export function useUpdateProfile(): ProfileUpdateMutation { | |||
queryClient.invalidateQueries({ queryKey: [RQK.MEMBER_LIST] }); | |||
queryClient.invalidateQueries({ queryKey: [RQK.MEMBER_DETAIL] }); | |||
queryClient.invalidateQueries({ queryKey: [RQK.PROFILE] }); | |||
queryClient.invalidateQueries({ queryKey: [RQK.ORG_DETAIL] }); |
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.
Thanks for noticing the issue and making the fix!
Scope of changes
SandboxLayout
to sandbox users who have completed onboarding.getInitials
function to resolve an error experienced during development.getInitials
function.org name
didn't appear in theSidebar
after completing onboarding by invalidating theorg list
andorg detail
queries.Note: A test will be added in a separate PR.
Fixes SC-23123, SC-23125, & SC-23347
Type of change
Acceptance criteria
https://www.awesomescreenshot.com/video/24094232?key=a812e61e398631659e307c58a6e24836
Definition of Done
Reviewer(s) checklist