Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Commit df0b38d

Browse files
committed
re-implement the scroll animation
1 parent 91e6acd commit df0b38d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/components/proposals/ProposalCard.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { Button } from "@/components/ui/button";
1717
import { RefreshCw, AlertCircle } from "lucide-react";
1818
import { safeNumberFromBigInt } from "@/utils/proposal";
1919
import { cn } from "@/lib/utils";
20+
import { motion } from "framer-motion";
2021

2122
interface ProposalCardProps {
2223
proposal: Proposal | ProposalWithDAO;
@@ -151,7 +152,12 @@ export default function ProposalCard({
151152
}, [proposal]);
152153

153154
return (
154-
<div>
155+
<motion.div
156+
initial={{ opacity: 0, y: 20 }}
157+
whileInView={{ opacity: 1, y: 0 }}
158+
viewport={{ once: false, margin: "0px 0px -100px 0px", amount: 0.3 }}
159+
transition={{ duration: 0.5, ease: "easeOut" }}
160+
>
155161
<Link
156162
href={`/proposals/${proposal.id}`}
157163
className="block group cursor-pointer"
@@ -481,6 +487,6 @@ export default function ProposalCard({
481487
)}
482488
</div>
483489
</Link>
484-
</div>
490+
</motion.div>
485491
);
486492
}

0 commit comments

Comments
 (0)