-
-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: π Add stargazers animated gif
β Closes: #1557
- Loading branch information
1 parent
fe17b1e
commit 0cda65b
Showing
4 changed files
with
35 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from "react"; | ||
|
||
const AnimatedGIF = ({ srcs, alts }) => { | ||
return ( | ||
<div> | ||
{srcs.map((src, index) => { | ||
const isMP4 = src.endsWith('.mp4'); | ||
return isMP4 ? ( | ||
<video key={index} src={src} autoPlay loop muted /> | ||
) : ( | ||
<img key={index} src={src} alt={alts[index]} className="w-102 h-80 rounded-lg" /> | ||
); | ||
})} | ||
</div> | ||
); | ||
}; | ||
|
||
export default AnimatedGIF; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.