-
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.
who-follow component and sidebarSection component
- Loading branch information
1 parent
e6010e4
commit cb9e761
Showing
6 changed files
with
52 additions
and
14 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,29 @@ | ||
import PropTypes from "prop-types"; | ||
import { Link } from "react-router-dom"; | ||
export default function SidebarSection({title,children,more}){ | ||
return ( | ||
<section className="bg-[#16181c] overflow-hidden mb-4 rounded-2xl border border-[#16181c]"> | ||
<h5 className="py-3 px-4 text-xl font-extrabold leading-6 flex items-center text-[#e7e9ea]"> | ||
{title} | ||
</h5> | ||
<div className="grid"> | ||
{children} | ||
</div> | ||
{more && ( | ||
<Link to={more} | ||
className="h-[52px] flex items-center px-4 text-[15px] text-[#1d9bf0] transition-colors hover:bg-white/[0.03]"> | ||
Daha fazla göster | ||
</Link> | ||
)} | ||
</section> | ||
) | ||
} | ||
|
||
SidebarSection.propTypes = { | ||
title : PropTypes.string.isRequired, | ||
children : PropTypes.node.isRequired, | ||
more : PropTypes.oneOfType([PropTypes.bool,PropTypes.string]) | ||
} | ||
SidebarSection.defaultProps = { | ||
more:false | ||
} |
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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import Premium from "~/layouts/main/rightbar/premium"; | ||
import Topics from "~/layouts/main/rightbar/topics"; | ||
import WhoFollow from "~/layouts/main/rightbar/who-follow"; | ||
import Search from "~/layouts/main/rightbar/search"; | ||
|
||
export default function RightBar (){ | ||
return ( | ||
<aside className="w-[350px] mr-2.5"> | ||
<Search /> | ||
<Premium /> | ||
<Topics /> | ||
<WhoFollow/> | ||
</aside> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,17 +1,12 @@ | ||
|
||
import SidebarSection from "~/components/sidebar-section"; | ||
import Topic from "~/layouts/main/rightbar/topics/topic"; | ||
import { topics } from "~/utils/consts"; | ||
|
||
export default function Topics(){ | ||
return ( | ||
<section className="bg-[#16181c] mb-4 rounded-2xl border border-[#16181c]"> | ||
<h5 className="py-3 px-4 text-xl font-extrabold leading-6 flex items-center text-[#e7e9ea]"> | ||
İlgini çekebilecek gündemler | ||
</h5> | ||
<div className="grid"> | ||
{topics.map((topic, index) => | ||
<Topic key={index} item={topic} /> | ||
)} | ||
</div> | ||
</section> | ||
<SidebarSection title="İlgini çekebilecek gündemler" more="/trends"> | ||
{topics.map((topic, index) => <Topic key={index} item={topic} /> )} | ||
</SidebarSection> | ||
) | ||
} |
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,14 @@ | ||
import SidebarSection from "~/components/sidebar-section"; | ||
import { useAccount } from "~/store/auth/hooks"; | ||
|
||
export default function WhoFollow(){ | ||
|
||
const account = useAccount(); | ||
|
||
return ( | ||
<SidebarSection title="Kimi takip etmeli" | ||
more={`/connect_people?user_id=${account.id}`}> | ||
|
||
</SidebarSection> | ||
) | ||
} |