Complete the code to define a parallel route segment in Next.js.
export const metadata = { title: 'Dashboard' };
export default function DashboardLayout({ children }) {
return <section>[1]{children}</section>;
}The <main> tag is used to wrap the main content in a layout, which is common in Next.js layouts including parallel routes.
Complete the code to import a parallel route segment in Next.js App Router.
import [1] from './(admin)/settings/page';
When importing a parallel route segment, the folder name is used as the import name, here 'Settings' matches the folder '(admin)/settings'.
Fix the error in the parallel route segment definition by completing the blank.
export default function [1]() { return <div>Admin Settings</div>; }
The function name should match the segment name for clarity and convention, here 'Settings' matches the route segment folder.
Fill both blanks to correctly define parallel routes in Next.js App Router.
export const parallelRoutes = {
[1]: () => import('./(marketing)/home/page'),
[2]: () => import('./(admin)/dashboard/page')
};The keys in the parallelRoutes object represent the route names, matching the folder names 'marketing' and 'admin'.
Fill all three blanks to create a parallel route layout with metadata and children rendering.
export const metadata = { title: '[1]' };
export default function [2]Layout({ children }) {
return <[3]>{children}</[3]>;
}The metadata title is 'Admin Panel', the function name matches the segment 'Admin', and the children are wrapped in a semantic <section> tag.