From 77d17b7b5a4749e9326fa65bc7a4ab97c40eda47 Mon Sep 17 00:00:00 2001 From: jmgasper Date: Fri, 2 Oct 2026 09:45:48 +1000 Subject: [PATCH] Restore Wipro profile and payment links in the Topgear account menu --- README.md | 5 +++++ src/lib/components/user-area/UserMenu.svelte | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ae39ae5e..477f5160 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,11 @@ The responsive header reuses community-app's Wipro, Topcoder, and Topgear logos. Home links to `https://topgear-app.wipro.com`; Challenges links to `/opportunities/challenge` on the current Topgear origin. It retains account controls, without the tool selector, Leaderboard, or the community hero banner. +For signed-in members, the avatar menu links My Profile to +`https://topgear-app.wipro.com/user-details` and Payments to +`https://topgear-app.wipro.com/my_payments` (a new tab), matching community-app. +Account Settings and Log Out remain available. The Wipro destinations apply only +to the two Topgear hosts; other hosts retain their Topcoder profile link. Deploy the navigation bundle before the Platform UI migration. Its CloudFront CORS policy must allow the matching Topgear origin (included in the IAC template). This change does not redirect production community-app URLs. diff --git a/src/lib/components/user-area/UserMenu.svelte b/src/lib/components/user-area/UserMenu.svelte index 6ed0f461..0e4998cc 100644 --- a/src/lib/components/user-area/UserMenu.svelte +++ b/src/lib/components/user-area/UserMenu.svelte @@ -2,13 +2,16 @@ import type { AuthUser } from "lib/app-context"; import { ACCOUNT_SETTINGS_HOST, CUSTOMER_LOGIN, PROFILE_HOST, APP_AUTH_CONNECTOR } from "lib/config"; import { routeMatchesUrl } from "lib/utils/routes"; + import { resolveNavigationType } from "lib/utils/navigation-type"; import styles from "./UserMenu.module.scss"; export let user: AuthUser; export let onSignOut: () => void; export let profileCompletionPerc: number | undefined; - const MY_PROFILE_URL = `${PROFILE_HOST}/${user.handle}`; + const topgear = resolveNavigationType('tool', window.location.hostname) === 'topgear'; + $: MY_PROFILE_URL = topgear ? 'https://topgear-app.wipro.com/user-details' : `${PROFILE_HOST}/${user.handle}`; + const PAYMENTS_URL = 'https://topgear-app.wipro.com/my_payments'; const ACC_SETTINGS_URL = `${ACCOUNT_SETTINGS_HOST}`; function isActive(url: string): boolean { @@ -29,6 +32,11 @@ class:active={isActive(MY_PROFILE_URL)} >My Profile + {#if topgear} +
  • + Payments +
  • + {/if}