-
-
Notifications
You must be signed in to change notification settings - Fork 934
fix: play cards ui #1461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
priyankarpal
merged 7 commits into
reactplay:main
from
Akshaygore1:feat/play-card-fixes
Feb 24, 2024
Merged
fix: play cards ui #1461
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
85dd02f
Play Card UI FIxes
Akshaygore1 c006950
Merge branch 'main' into feat/play-card-fixes
priyankarpal 92166dc
Update QuizApp.tsx
Akshaygore1 5c22b16
Changes in color
Akshaygore1 ef4232a
Added Card Styling Changes As Requested
Akshaygore1 4543ed8
Merge branch 'main' into feat/play-card-fixes
priyankarpal 17c445c
Merge branch 'main' into feat/play-card-fixes
priyankarpal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.