Skip to content
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

Refactor user tag followers component #18

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 5 additions & 46 deletions components/tags/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,61 +21,16 @@ export default function TagFollowers({ followers: initialFollowers, tag, session
useEffect(() => {
setFollowers(initialFollowers)
}, [initialFollowers])
const settings = {
dots: false,
infinite: false,
draggable: true,
speed: 500,
slidesToShow: 5,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 4,
slidesToScroll: 1,
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
};
return (
<div className="flex justify-center w-full">
<div className="mb-20 w-full">
<div className="my-10">
<h2 className="text-2xl font-medium tracking-tight w-full">Who to follow</h2>
</div>
<div className="mt-6 mb-10">
{/* <div className="flex md:grid md:grid-cols-3 overflow-x-hidden overflow-y-scroll lg:grid-cols-4 xl:grid-cols-5 py-0.5 items-center gap-6 justify-between">
{
followers.map((follower: any) => (
<UserVerticalCard key={follower.id} user={follower.follower} session={session} />
))
}
</div> */}
<Swiper
slidesPerView={5}
spaceBetween={24}
navigation={
{
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev'
}
}
modules={[Navigation]}
breakpoints={{
1280: {
slidesPerView: 5,
Expand All @@ -93,7 +48,11 @@ export default function TagFollowers({ followers: initialFollowers, tag, session
640: {
slidesPerView: 1,
spaceBetween: 24,
}
},
320: {
slidesPerView: 1,
spaceBetween: 24,
},
}}
className="mySwiper"
>
Expand Down