chore: [app-router-migration 16]: migrate routing forms page (#13015)
Co-authored-by: Benny Joo <[email protected]>
This commit is contained in:
1 parent
dd7673b1f9
commit
bdd1d3a99d
29 files changed
+665
-333
No files matched your search
@@ -46,7 +46,7 @@ export type AppProps = Omit<
|
||||
requiresLicense?: boolean;
|
||||
isThemeSupported?: boolean;
|
||||
isBookingPage?: boolean | ((arg: { router: NextAppProps["router"] }) => boolean);
|
||||
getLayout?: (page: React.ReactElement, router: NextAppProps["router"]) => ReactNode;
|
||||
getLayout?: (page: React.ReactElement) => ReactNode;
|
||||
PageWrapper?: (props: AppProps) => JSX.Element;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// returns query object same as ctx.query but for app dir
|
||||
export const getQuery = (url: string, params: Record<string, string | string[]>) => {
|
||||
if (!url.length) {
|
||||
return params;
|
||||
}
|
||||
|
||||
const { searchParams } = new URL(url);
|
||||
const searchParamsObj = Object.fromEntries(searchParams.entries());
|
||||
|
||||
return { ...searchParamsObj, ...params };
|
||||
};
|
||||
Reference in new issue
Block a user