I have been doing a blog with next.js and I am creating the header, but the links are not working, I read the next.js documentation and made the links step by step, but every time I reload my website and click the links, my console says :" GET https://gdjly5-3000.csb.app/About 404 (Not Found)". I doble-check the spelling-mistakes and the folder and seems ok. I am confused. Can somebody help me? Thanks a lot Here is the Intro.tsx
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>
);
}
Above I show you where every component is located