Skip to content

Commit f30a9f3

Browse files
authored
Merge pull request #11 from Awnder/scripture-encouragement
fix: verseslideshow animation renders properly and remove multiple cards
2 parents 1b0cdd4 + e554891 commit f30a9f3

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed

src/components/VerseSlide.tsx

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import React from "react";
22
import { cn } from "@/lib/utils";
3-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
4-
import { motion, AnimatePresence } from "framer-motion";
53

64
interface VerseSlideProps {
75
className?: string;
@@ -16,24 +14,8 @@ const VerseSlide: React.FC<VerseSlideProps> = ({
1614
}) => {
1715
return (
1816
<div className={cn("default-class", className)}>
19-
<Card>
20-
<CardHeader>
21-
<CardTitle>{verseReference}</CardTitle>
22-
</CardHeader>
23-
{/* <AnimatePresence mode="wait">
24-
<motion.div
25-
key="verse"
26-
initial={{ opacity: 0 }}
27-
animate={{ opacity: 1 }}
28-
exit={{ opacity: 0 }}
29-
transition={{ duration: 0.5 }}
30-
> */}
31-
<CardContent>
32-
<blockquote className="text-lg italic mb-4">{verseText}</blockquote>
33-
</CardContent>
34-
{/* </motion.div>
35-
</AnimatePresence> */}
36-
</Card>
17+
<blockquote className="text-lg">{verseReference}</blockquote>
18+
<blockquote className="text-muted-foreground italic">{verseText}</blockquote>
3719
</div>
3820
);
3921
};

src/components/VerseSlideshow.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const VerseSlideshow: React.FC<VerseSlideshowProps> = ({ className }) => {
2929

3030
return (
3131
<div className={cn("default-class", className)}>
32-
<AnimatePresence>
32+
<AnimatePresence mode="wait">
3333
{Object.entries(verseReferences).map(
3434
([reference, text], index) =>
3535
index === currentIndex && (
@@ -38,6 +38,7 @@ const VerseSlideshow: React.FC<VerseSlideshowProps> = ({ className }) => {
3838
initial={{ opacity: 0 }}
3939
animate={{ opacity: 1 }}
4040
exit={{ opacity: 0 }}
41+
transition={{ duration: 0.5, ease: "easeInOut" }}
4142
>
4243
<VerseSlide verseReference={reference} verseText={text} />
4344
</motion.div>

src/pages/Dashboard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,11 @@ const Dashboard: React.FC = () => {
306306
</div>
307307

308308
<div className="glass-card rounded-lg p-6 text-center">
309+
<h3 className="text-xl font-medium mb-3">Daily Inspiration</h3>
309310
<VerseSlideshow />
310311
</div>
311312
</motion.div>
312313
);
313314
};
314315

315-
export default Dashboard;
316+
export default Dashboard;

0 commit comments

Comments
 (0)