-
Notifications
You must be signed in to change notification settings - Fork 0
LPU release #389
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
LPU release #389
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,8 @@ export const buildContext = (newConfig: Partial<NavigationAppProps>, prevContext | |
| fullFooter = prevContext.toolConfig?.fullFooter, | ||
| showSalesCta = prevContext.toolConfig?.showSalesCta, | ||
| profileCompletionData = prevContext.auth?.profileCompletionData, | ||
| signupUtmCodes = prevContext.signupUtmCodes, | ||
| simplifiedNav = prevContext.simplifiedNav, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| } = {...newConfig, user: undefined} | ||
|
|
||
| const hasUserProp = hasOwnProperty(newConfig, 'user') && newConfig['user'] !== 'auto' | ||
|
|
@@ -45,6 +47,8 @@ export const buildContext = (newConfig: Partial<NavigationAppProps>, prevContext | |
| fullFooter, | ||
| showSalesCta, | ||
| }, | ||
| signupUtmCodes, | ||
| simplifiedNav, | ||
| supportMeta, | ||
| integrations, | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,6 @@ export interface AppContext { | |
| toolConfig: ToolConfig | ||
| navigationHandler: NavigationHandler | ||
| supportMeta?: SupportMeta | ||
| signupUtmCodes?: string | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| simplifiedNav?: boolean | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,7 +80,14 @@ | |
| function onSignIn(signup?: any) { | ||
| const locationHref = `${window.location.origin}${window.location.pathname}` | ||
| window.location.href = `${AUTH0_AUTHENTICATOR_URL}?retUrl=${encodeURIComponent(locationHref)}${signup === true ? '&mode=signUp' : ''}`; | ||
| const signupUrl = [ | ||
| `${AUTH0_AUTHENTICATOR_URL}?retUrl=${encodeURIComponent(locationHref)}`, | ||
| signup === true ? '&mode=signUp' : '', | ||
| $ctx.signupUtmCodes, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| ].filter(Boolean).join('&') | ||
| window.location.href = signupUrl; | ||
| } | ||
| function onSignUp() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,7 @@ | |
| menuItems={menuItems} | ||
| isMobile={$isMobile} | ||
| navigationHandler={navigationHandler} | ||
| simplifiedNav={$ctx.simplifiedNav} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| > | ||
| <UserArea slot="auth" /> | ||
| </NavigationBar> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,23 +11,26 @@ | |
| export let activeRoute: NavMenuItem; | ||
| export let isMobile: boolean = false; | ||
| export let navigationHandler: NavigationHandler | undefined; | ||
| export let simplifiedNav: boolean = false; | ||
| </script> | ||
|
|
||
| <TopNavbar style={style} minVersionLogo={isMobile}> | ||
| {#if isMobile} | ||
| <MobileNavigation | ||
| menuItems={[...menuItems]} | ||
| activeRoute={activeRoute} | ||
| activeRoutePath={activeRoutePath} | ||
| /> | ||
| {:else} | ||
| <LinksMenu | ||
| menuItems={menuItems} | ||
| style={style} | ||
| activeRoute={activeRoute} | ||
| activeRoutePath={activeRoutePath} | ||
| navigationHandler={navigationHandler} | ||
| /> | ||
| {#if !simplifiedNav} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| {#if isMobile} | ||
| <MobileNavigation | ||
| menuItems={[...menuItems]} | ||
| activeRoute={activeRoute} | ||
| activeRoutePath={activeRoutePath} | ||
| /> | ||
| {:else} | ||
| <LinksMenu | ||
| menuItems={menuItems} | ||
| style={style} | ||
| activeRoute={activeRoute} | ||
| activeRoutePath={activeRoutePath} | ||
| navigationHandler={navigationHandler} | ||
| /> | ||
| {/if} | ||
| {/if} | ||
|
|
||
| <svelte:fragment slot="right"> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,8 @@ export declare const buildContext: (newConfig: Partial<NavigationAppProps>, prev | |
| fullFooter: any; | ||
| showSalesCta: any; | ||
| }; | ||
| signupUtmCodes: any; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| simplifiedNav: any; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| supportMeta: any; | ||
| integrations: any; | ||
| }; | ||
|
|
||
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.
[⚠️
correctness]The addition of
signupUtmCodesto the destructuring assignment and the return object seems correct, but ensure thatsignupUtmCodesis always defined inprevContextto avoid potentialundefinedissues. Consider providing a default value if necessary.