0

It's giving this error After clicking this

My code is like this:

import './header.css';
import { FaHeart } from 'react-icons/fa';
import Link from 'next/link';

export default function Header() {
    return (
        <>
            <header className="header">
                <div className="header-div"><a>A + B <FaHeart id="header-heart" /></a></div>
                <nav className="header-nav">
                    <Link href="/fotos">FOTOS</Link>
                    <a>CARTAS</a>
                    <a>CLIQUE AQUI</a>
                </nav>
            </header>
        </>
    )
}

My files are like this

behaga
  • 1
  • 1
  • Welcome to Stack Overflow! Please note that link to images and code are not encouraging others to help you. – Nikolaus Jul 02 '23 at 10:49

1 Answers1

0

Next.js routes require files in the "pages" folder for proper functionality.

When you create a new file in the "pages" folder, Next.js automatically generates a corresponding route based on the file's location and name. For example, if you create a file called "about.js" in the "pages" folder, Next.js will create a route for "/about" that renders the component defined in the "about.js" file.

By deviating from this file-based routing system, Next.js won't be able to recognize the routes or render the appropriate components. It relies on the specific structure and conventions of the "pages" folder to determine the routing behavior.

Read more at Pages and Layouts and Linking and Navigating .

Dev
  • 54
  • 5