fix: add decoding logic to app router params (#18712)
* decode app router params in buildLegacyCtx * add helpful comments * add comment * address comment
This commit is contained in:
1 parent
b7f7c33afc
commit
c37a8a587b
3 files changed
+27
-2
No files matched your search
@@ -106,6 +106,9 @@ export const getServerSideProps: GetServerSideProps<UserPageProps> = async (cont
|
||||
|
||||
if (isDynamicGroup) {
|
||||
const destinationUrl = `/${usernameList.join("+")}/dynamic`;
|
||||
|
||||
// EXAMPLE - context.params: { orgSlug: 'acme', user: 'member0+owner1' }
|
||||
// EXAMPLE - context.query: { redirect: 'undefined', orgRedirection: 'undefined', user: 'member0+owner1' }
|
||||
const originalQueryString = new URLSearchParams(context.query as Record<string, string>).toString();
|
||||
const destinationWithQuery = `${destinationUrl}?${originalQueryString}`;
|
||||
log.debug(`Dynamic group detected, redirecting to ${destinationUrl}`);
|
||||
|
||||
Reference in new issue
Block a user