This commit is contained in:
Jordi Enric
2024-10-27 00:32:18 +02:00
parent d9ea7c1e84
commit ce1a36b8ae
3 changed files with 5 additions and 10 deletions
+1
View File
@@ -4,6 +4,7 @@ import { ArrowLeftIcon } from "lucide-react";
import Link from "next/link";
import React from "react";
export const dynamic = "auto";
const Post = async ({ params: { slug } }: { params: { slug: string } }) => {
const blog = getBlogClient();
const { data: post } = await blog.posts.get({ slug });
+3 -10
View File
@@ -2,18 +2,11 @@
import { getBlogClient } from "@/cms";
import Link from "next/link";
import React from "react";
import { Tags } from "./ui/Tags";
type Props = {};
const Blog = async (props: Props) => {
export const dynamic = "auto";
const Blog = async () => {
const blog = getBlogClient();
const [{ data: posts }, { data: categories }, { data: tags }] =
await Promise.all([
blog.posts.list(),
blog.categories.list(),
blog.tags.list(),
]);
const { data: posts } = await blog.posts.list();
const latestPost = posts[0];
const postsWithoutLatest = posts.slice(1);
+1
View File
@@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"typecheck": "tsc --noEmit",
"build": "next build",
"build:web": "next build",
"dev": "next dev -p 8082",