-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: vip shortcut implemented 'properly', preserving the SSG
- Loading branch information
1 parent
dc462ad
commit 0ee3606
Showing
7 changed files
with
62 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* v8 ignore start */ | ||
// Stryker disable all | ||
|
||
import type { MaybeUndefined } from '@rtm/shared-types/CustomUtilityTypes'; | ||
import type { AppPath } from '@rtm/shared-types/Next'; | ||
|
||
import { VIP_SHORTCUTS } from '@/middleware'; | ||
|
||
import { getPathnameWithoutI18nFlag } from '../i18n'; | ||
|
||
function getVipRouteShortcut(pathname: AppPath): MaybeUndefined<AppPath> { | ||
const currentRoute = getPathnameWithoutI18nFlag(pathname); | ||
const vipShortcut = VIP_SHORTCUTS[currentRoute as keyof typeof VIP_SHORTCUTS] as MaybeUndefined<AppPath>; | ||
return vipShortcut; | ||
} | ||
|
||
export default getVipRouteShortcut; | ||
|
||
// Stryker restore all | ||
/* v8 ignore stop */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters