I've been working on a blog using next.js and I'm having trouble with the header links not working. I followed the next.js documentation to create the links, but whenever I reload the website and try to click the links, my console shows: "GET 404 (Not Found)". I've double-checked for spelling mistakes and the folder structure, but everything seems correct. I'm feeling confused. Can someone offer assistance? Thank you.
import Link from "next/link";
import Image from "next/image";
import logo from "./image/emily-logo.jpg";
export default function Intro() {
return (
<section>
<nav>
<a href="/">HOME </a>
<Link href="/intro-pages/about">ABOUT</Link>
<Link href="/intro-pages/blog">BLOG</Link>
<Link href="/intro-pages/Press">PRESS</Link>
<Link href="/intro-pages/Services">PERSONAL STYLED SERVICES</Link>
</nav>
<Image alt="emily-logo" className="logo-header" src={logo} />
</section>
);
}
Here is the Page.tsx
import Container from "@/app/_components/container";
import { HeroPost } from "@/app/_components/hero-post";
// import { Intro } from "@/app/_components/intro";
import Intro from '@/app/_components/intro'
import {SocialMedia} from '@/app/_components/SocialMedia'
import {HomePage} from '@/app/_components/HomePage'
import {Testimonial} from '@/app/_components/Testimonial'
import { MoreStories } from "@/app/_components/more-stories";
import { getAllPosts } from "../lib/api";
export default function Index() {
const allPosts = getAllPosts();
const heroPost = allPosts[0];
const morePosts = allPosts.slice(1);
return (
<main>
<Container>
<Intro />
<HomePage/>
<SocialMedia/>
<Testimonial/>
<HeroPost
title={heroPost.title}
coverImage={heroPost.coverImage}
date={heroPost.date}
author={heroPost.author}
slug={heroPost.slug}
excerpt={heroPost.excerpt}
/>
{morePosts.length > 0 && <MoreStories posts={morePosts} />}
</Container>
</main>
);
}
Here is the about.txs
export function About() {
return (
<section>
<h1>This is the About Page</h1>
</section>
);
}
https://i.sstatic.net/sq7Kq.png
Above I show you where every component is located