Navigation
Answered
Shine posted this in #help-forum
ShineOP
Hello there, i'm pretty new to NextJs, i wanted to know how could i build a navigation ? I mean, i have the file "pages.js" in my /app, and i created some directories into /app so it means i have things like :
/app
--/blog
--/test
page.js
layout.js
I'm in my "page.js", and i created a <Link href="/blog">Blog<Link/> and it doesnt works, did i missed something ?
/app
--/blog
--/test
page.js
layout.js
I'm in my "page.js", and i created a <Link href="/blog">Blog<Link/> and it doesnt works, did i missed something ?
Answered by B33fb0n3
inside
blog there must be also a page.js, that displays the page of the blog. So just rename your blog.js to page.js7 Replies
ShineOP
@Shine Click to see attachment
inside
blog there must be also a page.js, that displays the page of the blog. So just rename your blog.js to page.jsAnswer
ShineOP
Ow, ok thx, so for every navigation i want to create, it must be named "page.js" ?
at least it works, thanks mate!
@Shine Ow, ok thx, so for every navigation i want to create, it must be named "page.js" ?
yea, every page, that you want to create must be called
page.js@Shine at least it works, thanks mate!
happy to help. Please mark solution