Menu Component in NextJS

In the next tutorials, we will study the special features of NextJS for creating a site menu. For this, we will need a component with the site menu. In this tutorial, we will make a template of this component, and we will insert the links in the next tutorials.

Our template will look as follows:

/src/comps/menu/menu.jsxexport default function Menu() {
  return <>
    ...
  </>;
}

Let's insert this template into the main site layout:

app/layout.jsximport Menu from '@/comps/menu/menu.jsx';

export default function RootLayout({children}) {
  return (
    <html lang="en">
      <body>
        <header>
          <nav>
            <Menu />
          </nav>
        </header>
        <main>
          {children}
        </main>
        <footer>
          footer
        </footer>
      </body>
    </html>
  );
}
Задание 1

Create a component for the main menu.