Skip to content
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

Updated Transline UIO Home Link #629

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions components/TransLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ function resolveUrl(link: I18nString, userArrivedFromUioMobile: boolean) {
// If the link is for UIO homepage or UIO landing page, do a direct getUrl() lookup.
// Do not pass the looked up url through t() because t() will mangle the url.
if (link === 'uio-home') {
const uioHomeLink = userArrivedFromUioMobile ? getUrl('uio-mobile-home') : getUrl('uio-desktop-home')
const uioHomeLink = userArrivedFromUioMobile
? getUrl('uio-mobile-home', undefined, i18n?.language)
: getUrl('uio-desktop-home', undefined, i18n?.language)
if (uioHomeLink) {
return uioHomeLink
}
}
// Special case for UIO landing page links.
else if (link === 'uio-landing-page') {
const uioLandingPageLink = userArrivedFromUioMobile
? getUrl('uio-mobile-landing-page')
? getUrl('uio-mobile-landing-page', undefined, i18n?.language)
: getUrl('uio-desktop-landing-page', undefined, i18n?.language)
if (uioLandingPageLink) {
return uioLandingPageLink
Expand Down
Loading