-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { useEffect, useRef } from "react"; | ||
import { FaCrown } from "react-icons/fa"; | ||
import { gsap } from 'gsap'; | ||
|
||
const EndCard = () => { | ||
const affRef = useRef<HTMLDivElement>(null); | ||
const writeRef = useRef<HTMLDivElement>(null); | ||
|
||
useEffect(() => { | ||
if (affRef.current && writeRef.current) { | ||
gsap.fromTo(affRef.current, { opacity: 0 }, { opacity: 1, duration: 0.5, ease: "power2.inOut" }); | ||
gsap.fromTo(writeRef.current, { scale: 0.9 }, { scale: 1.1, duration: 1, yoyo: true, repeat: -1, ease: "bounce.in" }); | ||
} | ||
}, []); | ||
|
||
return ( | ||
<div className="flex justify-center items-center h-full bg-slate-900"> | ||
<div> | ||
<div ref={affRef} className="pb-8 text-2xl text-slate-200"> | ||
Good Job!!<br /> | ||
<small>You're all done</small> | ||
</div> | ||
<div ref={writeRef} className="flex justify-center items-center text-slate-200"> | ||
<FaCrown size={148} /> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default EndCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ const Exercise = (props: ExerciseProps) => { | |
); | ||
} | ||
|
||
export default Exercise; | ||
export default Exercise; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters