wasowasowaso

This commit is contained in:
2023-07-26 18:11:25 +02:00
parent 284171c7e9
commit f90db54fc1
13 changed files with 442 additions and 85 deletions

View File

@@ -14,7 +14,9 @@ type Post = {
title: String,
content: String
}
async function getData(slug:String):Promise<Array<any>> {
// Get all posts from the API
const res = await fetch(`http://localhost:3000/api/post/${slug}`);
// The return value is *not* serialized
// You can return Date, Map, Set, etc.

29
src/app/projects/page.tsx Normal file
View File

@@ -0,0 +1,29 @@
import Header from "@/components/header";
import PageContainer from "@/components/page-container";
import Navbar from "@/components/navbar";
import Sidebar from "@/components/sidebar";
import ArticlePreview from "@/components/news/article-preview"
import ReactDOM from "react";
import "public/global.css"
import "@/app/index.css"
export default function Page() {
return <div className={`root`}>
<Header/>
<Navbar/>
<PageContainer>
<Sidebar>
<h1>
Filters
</h1>
<ul><li>filter 1</li><li>filter 2</li><li>filter 3</li></ul>
</Sidebar>
<main>
<ArticlePreview/>
<ArticlePreview/>
<ArticlePreview/>
</main>
</PageContainer>
</div>;
}