Skip to content

Conversation

@vas3a
Copy link
Collaborator

@vas3a vas3a commented Nov 28, 2025

Accept new config fields:

  • signupUtmCodes - string text that will get appended to the signup/signin urls
  • simplifiedNav - will hide the main marketing navigation, leaving the user with only signup/signin links

@vas3a vas3a requested a review from kkartunov November 28, 2025 09:25
fullFooter = prevContext.toolConfig?.fullFooter,
showSalesCta = prevContext.toolConfig?.showSalesCta,
profileCompletionData = prevContext.auth?.profileCompletionData,
signupUtmCodes = prevContext.signupUtmCodes,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
Consider adding a default value for signupUtmCodes to handle cases where prevContext.signupUtmCodes is undefined. This can prevent potential runtime errors if the value is used without checking for its existence.

showSalesCta = prevContext.toolConfig?.showSalesCta,
profileCompletionData = prevContext.auth?.profileCompletionData,
signupUtmCodes = prevContext.signupUtmCodes,
simplifiedNav = prevContext.simplifiedNav,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
Consider adding a default value for simplifiedNav to handle cases where prevContext.simplifiedNav is undefined. This can prevent potential runtime errors if the value is used without checking for its existence.

const signupUrl = [
`${AUTH0_AUTHENTICATOR_URL}?retUrl=${encodeURIComponent(locationHref)}`,
signup === true ? '&mode=signUp' : '',
$ctx.signupUtmCodes,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
Ensure that $ctx.signupUtmCodes is properly sanitized and validated to prevent potential injection attacks or malformed URLs. If this value is user-controlled or comes from an external source, it could pose a security risk.

menuItems={menuItems}
isMobile={$isMobile}
navigationHandler={navigationHandler}
simplifiedNav={$ctx.simplifiedNav}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
Ensure that $ctx.simplifiedNav is properly initialized and has a default value in case it is not set in the context. This will prevent potential runtime errors if the context does not provide this value.

fullFooter: any;
showSalesCta: any;
};
signupUtmCodes: any;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ maintainability]
Consider specifying a more precise type than any for signupUtmCodes. Using any can lead to runtime errors and makes the code harder to maintain.

showSalesCta: any;
};
signupUtmCodes: any;
simplifiedNav: any;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ maintainability]
Consider specifying a more precise type than any for simplifiedNav. Using any can lead to runtime errors and makes the code harder to maintain.

toolConfig: ToolConfig;
navigationHandler: NavigationHandler;
supportMeta?: SupportMeta;
signupUtmCodes?: string;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
Consider validating the format of signupUtmCodes to ensure it meets expected URL parameter standards. This can prevent potential issues with malformed URLs.

@vas3a vas3a merged commit d8ef14c into dev Nov 28, 2025
8 checks passed
@vas3a vas3a deleted the handle-signup-utm-codes branch November 28, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants