-
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
4 changed files
with
96 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,40 @@ | ||
import "../../../styles/BrowseHome.scoped.scss"; | ||
|
||
|
||
import React, { useContext } from "react"; | ||
import AuthContext from "../../../context/AuthContext"; | ||
|
||
import { Filter } from "./Filter"; | ||
import { Items } from "./Items"; | ||
|
||
const BrowseHome = () => { | ||
const { user } = useContext(AuthContext); | ||
|
||
return ( | ||
<> | ||
<div className="main2 flex justify-center items-center "> | ||
|
||
<div className="basis-1/4"> | ||
|
||
|
||
{/* filter */} | ||
<Filter /> | ||
|
||
</div> | ||
|
||
<div className="cards_container grow p-14"> | ||
|
||
{/* other one */} | ||
|
||
|
||
<Items /> | ||
|
||
|
||
|
||
</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export { BrowseHome }; |
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,42 @@ | ||
|
||
import { anime_data, genres, year, studio } from "../../../data"; | ||
import "../../../styles/BrowseHome.scoped.scss"; | ||
|
||
import { Link } from "react-router-dom"; | ||
|
||
const Items = () => { | ||
|
||
|
||
|
||
return <> | ||
|
||
<div className=" grid grid-cols-4 gap-x-6 gap-y-6 grow "> | ||
|
||
{/*individual card. for anime it shows */} | ||
{anime_data.map((item) => ( | ||
<Link | ||
to="/detailspage" | ||
state={{ id: item.anime_id, anime: true }} | ||
key={item.anime_id} | ||
> | ||
<div className="card"> | ||
<div className="card_img"> | ||
<img src={item.image} /> | ||
</div> | ||
|
||
<div className="flex flex-row gap-x-2 mt-3"> | ||
{/* check index.css, for global use, vertical rectangle.. */} | ||
|
||
<p className="title8 secondary-left-line">{item.title}</p> | ||
|
||
{/*TODO you add favorite button, and for it to work properly */} | ||
</div> | ||
</div> | ||
</Link> | ||
))} | ||
</div> | ||
|
||
</> | ||
} | ||
|
||
export {Items}; |
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