ref(frontend) several minor updates

This commit is contained in:
lumither committed 2025-10-08 12:42:54 -04:00
1 parent 88c2ad8664
commit cd39abbd45
12 files changed
+417 -39

No files matched your search

+3 -17
View File
@@ -1,33 +1,19 @@
'use server';
import React from 'react';
import BlogPostCard from '@/app/(pages)/blog/BlogPostCard';
import * as motion from 'motion/react-client';
import { fetchPostList } from '@/src/api/blog/post';
import AnimationPostList from '@/app/(pages)/blog/post/components/AnimationPostList';
const PostList = async ({ page }: { page: number }) => {
try {
const postListResponse = await fetchPostList(page);
const posts = postListResponse.data.posts;
return (
// blog list
<div className={ 'w-full' }>
<ul className={ 'flex flex-col items-center w-full space-y-7' }>
{ posts.map((post, key: number) => (
<li key={ key } className={ 'w-full' }>
<motion.div
initial={ { y: 20, opacity: 0 } }
animate={ { y: 0, opacity: 1 } }
transition={ { ease: 'easeInOut', duration: 0.5, delay: key * .2 + .25 } }
>
<BlogPostCard post={ post } />
</motion.div>
</li>)
) }
</ul>
<AnimationPostList posts={ posts } />
</div>
);
} catch (e: any) {