-
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
7 changed files
with
96 additions
and
77 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,14 @@ | ||
import React from "react"; | ||
import CommentsList from "./CommentsList"; | ||
import commentsDummyData from "../constants/commentsDummyData"; | ||
|
||
const CommentsContainer = () => { | ||
return ( | ||
<div> | ||
<h2 className=" font-bold text-lg mb-2">Comments:</h2> | ||
<CommentsList comments={commentsDummyData} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CommentsContainer; |
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,39 @@ | ||
import moment from "moment"; | ||
import React from "react"; | ||
import { Link } from "react-router-dom"; | ||
import Channel from "./Channel"; | ||
|
||
const SearchResultsContainer = ({ video }) => { | ||
return ( | ||
<Link | ||
to={"/watch?v=" + video?.id?.videoId} | ||
key={video.id.videoId || video.id.channelId || video.id.playlistId} | ||
> | ||
{video?.id?.kind !== "youtube#playlist" && ( | ||
<div className="flex flex-col sm:flex-row gap-2 relative"> | ||
<img | ||
src={video?.snippet?.thumbnails?.medium?.url} | ||
alt="thumbnail" | ||
className={` mb-5 ${ | ||
video?.id?.kind === "youtube#channel" | ||
? "rounded-full w-full sm:w-2/12 h-[12rem] mx-[5rem]" | ||
: "rounded-xl w-full sm:w-4/12 h-[12rem]" | ||
}`} | ||
/> | ||
<div className="w-full sm:w-8/12"> | ||
<h2 className=" text-lg">{video?.snippet?.title}</h2> | ||
<p className=" text-[14px] text-[#606060] ml-1"> | ||
{moment(video?.snippet?.publishedAt).fromNow()} | ||
</p> | ||
<div className=" my-4"> | ||
<Channel channelId={video?.snippet?.channelId} /> | ||
</div> | ||
<p className=" text-xs my-4">{video?.snippet?.description}</p> | ||
</div> | ||
</div> | ||
)} | ||
</Link> | ||
); | ||
}; | ||
|
||
export default SearchResultsContainer; |
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