fix: use m.article instead of motion.article in PostCard
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { motion } from "motion/react";
|
import { m } from "motion/react";
|
||||||
import type { PostMeta } from "@/lib/posts";
|
import type { PostMeta } from "@/lib/posts";
|
||||||
|
|
||||||
interface PostCardProps extends PostMeta {
|
interface PostCardProps extends PostMeta {
|
||||||
@@ -10,7 +10,7 @@ interface PostCardProps extends PostMeta {
|
|||||||
|
|
||||||
export function PostCard({ slug, title, date, excerpt, index = 0 }: PostCardProps) {
|
export function PostCard({ slug, title, date, excerpt, index = 0 }: PostCardProps) {
|
||||||
return (
|
return (
|
||||||
<motion.article
|
<m.article
|
||||||
initial={{ opacity: 0, y: 20 }}
|
initial={{ opacity: 0, y: 20 }}
|
||||||
whileInView={{ opacity: 1, y: 0 }}
|
whileInView={{ opacity: 1, y: 0 }}
|
||||||
transition={{ duration: 0.5, delay: index * 0.07 }}
|
transition={{ duration: 0.5, delay: index * 0.07 }}
|
||||||
@@ -26,6 +26,6 @@ export function PostCard({ slug, title, date, excerpt, index = 0 }: PostCardProp
|
|||||||
<p className="text-ink-soft leading-7">{excerpt}</p>
|
<p className="text-ink-soft leading-7">{excerpt}</p>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
</motion.article>
|
</m.article>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user