Skip to content

Commit

Permalink
NCL-8833 Disable LegacyUrlRedirector and Remove query string for lega…
Browse files Browse the repository at this point in the history
…cy url rediret
  • Loading branch information
DnsZhou committed Nov 18, 2024
1 parent 7bee175 commit 9b341b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hooks/useLegacyUrlRedirector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export const useLegacyUrlRedirector = () => {
if (pathname.startsWith(URL_BASE_PATH + '/') && hash.startsWith('#/')) {
let newPath = '/' + hash.substring(2); // Remove '#/' and concatenate

// Remove the query string part
newPath = newPath.split('?')[0];

// If it contains '/build-configs/', remove everything between '/pnc-web/' and '/build-configs/'
const buildConfigsIndex = newPath.indexOf('/build-configs/');
if (buildConfigsIndex !== -1) {
Expand Down

0 comments on commit 9b341b6

Please sign in to comment.