Catch all Route not working !!!
Answered
Asian swamp eel posted this in #help-forum
Asian swamp eelOP
why it giving me error ? trying to use catch all route
import NewsList from "@/components/news-list";
import { getNewsForYear } from "@/lib/news";
import React from "react";
function FilteredNewsPage({ params }) {
const filter = params.filter;
condole.log(filter)
// const news = getNewsForYear(newsYear);
// return <NewsList news={news} />;
}
export default FilteredNewsPage;
6 Replies
Asian swamp eelOP
Asian swamp eelOP
I think it is because /archive/@archive will match both the page.jsx under [[...filter]] and the one above it
Asian swamp eelOP
@archive and /archive both will match ?
remove the page.jsx in @archive and it should work
Answer
Asian swamp eelOP
thx work