New news detail json
This commit is contained in:
parent
858dc41ebb
commit
146a3fdd5e
15 changed files with 2336 additions and 3021 deletions
13
ui/app/news/[id]/page.tsx
Normal file
13
ui/app/news/[id]/page.tsx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { fetchNewsData } from "../../../lib/fetchNewsData";
|
||||
import NewsDetail from "../../../components/NewsDetail";
|
||||
|
||||
|
||||
export default async function NewsPage({ params }: { params: { id: string } }) {
|
||||
const newsData = await fetchNewsData(params.id);
|
||||
|
||||
if (!newsData) {
|
||||
return <div>News not found</div>;
|
||||
}
|
||||
|
||||
return <NewsDetail news={newsData} />;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue