-
-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Play Card UI FIxes * Update QuizApp.tsx Signed-off-by: Akshay Gore <[email protected]> * Changes in color * Added Card Styling Changes As Requested --------- Signed-off-by: Akshay Gore <[email protected]> Co-authored-by: Priyankar Pal <[email protected]>
- Loading branch information
1 parent
ff67ea4
commit f9809a7
Showing
3 changed files
with
176 additions
and
47 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,57 @@ | ||
import React from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import { BsPlayCircleFill } from 'react-icons/bs'; | ||
import { BiLogoTypescript, BiLogoJavascript } from 'react-icons/bi'; | ||
|
||
import Shimmer from 'react-shimmer-effect'; | ||
import Like from 'common/components/Like/Like'; | ||
import userImage from 'images/user.png'; | ||
|
||
function PlayCard({ play, cover, likeObject }) { | ||
return ( | ||
<Link to={`/plays/${encodeURI(play.github.toLowerCase())}/${play.slug}`}> | ||
<div className="play-card-container"> | ||
<div className="play-thumb-container"> | ||
<Shimmer> | ||
<img alt="" className="play-card-thumb-img" src={cover} /> | ||
</Shimmer> | ||
<BsPlayCircleFill className="play-icon" color="white" size={80} /> | ||
</div> | ||
|
||
{/* <div className="border" /> */} | ||
<div className="card-header">{play.name}</div> | ||
{play.user && ( | ||
<div className="author"> | ||
<img | ||
alt="avatar" | ||
className="rounded-full border border-zink" | ||
height="25px" | ||
loading="lazy" | ||
src={ | ||
play?.user.avatarUrl | ||
? play?.user.avatarUrl.length | ||
? play?.user.avatarUrl | ||
: userImage | ||
: userImage | ||
} | ||
width="25px" | ||
/> | ||
<div className="author-name">{play?.user.displayName}</div> | ||
</div> | ||
)} | ||
<div className="play-actions mt-4"> | ||
<div className="like-container"> | ||
<Like likeObj={likeObject()} onLikeClick={null} /> | ||
{play.language === 'ts' ? ( | ||
<BiLogoTypescript className="lang-icon" color="#007acc" size={25} /> | ||
) : ( | ||
<BiLogoJavascript className="lang-icon" color="#F0DB4F" size={25} /> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
</Link> | ||
); | ||
} | ||
|
||
export default PlayCard; |
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