Complete the code to import the Next.js config.
import [1] from 'next/config';
The getConfig function is used to access Next.js runtime configuration.
Complete the code to get the public runtime config.
const { [1] } = getConfig();The publicRuntimeConfig contains config values exposed to the browser.
Fix the error in the path matching condition.
if (path.startsWith([1])) { console.log('Matched'); }
The argument to startsWith must be a string with quotes, like '/api/'.
Fill both blanks to create a config object with a path and a handler function.
const routeConfig = { path: [1], handler: [2] };The path should be a string with quotes, and the handler is a function expression.
Fill all three blanks to filter routes matching a prefix and map to their paths.
const matchedPaths = routes.filter(route => route.[1].startsWith([2])).map(route => route.[3]);
We filter by the path property starting with '/admin' and then map to the path.
