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

feat: sidebar #8

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion src/components/communities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ import { CaretLeft } from '../lib/icons';
import Community from './community';
import Footer from './footer';

interface DaoDetails {
id: number;
daoName: string;
members: string;
activeProps: string;
daoImage: string;
}

const data = [
{
id: 1,
Expand Down Expand Up @@ -121,7 +129,7 @@ const Communities = () => {
<Image src='/search.svg' alt='search icon' width={23} height={23} />
</div>
<div className='3xl:grid-cols-4 grid gap-6 p-6 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3'>
{data.map((dao) => (
{data.map((dao: DaoDetails) => (
<Community key={dao.id} daoDetails={dao} />
))}
</div>
Expand Down
7 changes: 2 additions & 5 deletions src/components/community.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import Image from 'next/image';

interface IDaoDetails {
interface DaoDetails {
id: number;
daoName: string;
members: string;
activeProps: string;
daoImage: string;
}
interface CommunityProps {
daoDetails: IDaoDetails;
}

const Community = ({ daoDetails }: CommunityProps) => {
const Community = ({ daoDetails }: { daoDetails: DaoDetails }) => {
const { daoName, members, activeProps, daoImage } = daoDetails;
return (
<div className='group flex w-[346px] flex-row items-center gap-4 rounded-full bg-gradient-to-l from-gray-0 to-gray-100 hover:from-purple-0 hover:to-purple-100'>
Expand Down
26 changes: 9 additions & 17 deletions src/components/communitySection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ import Image from 'next/image';

import Community from './community';

interface DaoDetails {
id: number;
daoName: string;
members: string;
activeProps: string;
daoImage: string;
}

const data = [
{
id: 1,
Expand Down Expand Up @@ -75,22 +83,6 @@ const data = [
daoImage:
'https://s3-alpha-sig.figma.com/img/65a7/293b/904d2512e46a292be511bb312b01702b?Expires=1713744000&Key-Pair-Id=APKAQ4GOSFWCVNEHN3O4&Signature=A8To-owaEO7wVseKJzLXM-7sVTwXK5WYBrVBeE~bsB-TTXyHVJzyws2m2HhGIvn35MPqXyDPt1JsYX6-0rfdyCrGhIcJNNxkoYHEofhF2pKtI4foDmB6Cxbc4DW1pBA7Bpm4OHFtxKicAa18yJib~iRIb2s00DJSnEVVcNvoDjwOQ8R5sDjJrC0tOSHsk84GJveVf7PpGvnMtJaqpJ~IgtYDfvPiqEN2WzH~0EgTIbOs1Dx~lL5FolZSY7PekGw8o43DatU0qzBtUig7pCZW8pekW2ybInSm1ZeFUgDFZ-KJv-J2JQDgdeOxp-VXvKJXrcmO6WyJzgYgbLAi-QSX4A__',
},
{
id: 10,
daoName: 'Flare Dao',
members: '803k',
activeProps: '#2',
daoImage:
'https://s3-alpha-sig.figma.com/img/65a7/293b/904d2512e46a292be511bb312b01702b?Expires=1713744000&Key-Pair-Id=APKAQ4GOSFWCVNEHN3O4&Signature=A8To-owaEO7wVseKJzLXM-7sVTwXK5WYBrVBeE~bsB-TTXyHVJzyws2m2HhGIvn35MPqXyDPt1JsYX6-0rfdyCrGhIcJNNxkoYHEofhF2pKtI4foDmB6Cxbc4DW1pBA7Bpm4OHFtxKicAa18yJib~iRIb2s00DJSnEVVcNvoDjwOQ8R5sDjJrC0tOSHsk84GJveVf7PpGvnMtJaqpJ~IgtYDfvPiqEN2WzH~0EgTIbOs1Dx~lL5FolZSY7PekGw8o43DatU0qzBtUig7pCZW8pekW2ybInSm1ZeFUgDFZ-KJv-J2JQDgdeOxp-VXvKJXrcmO6WyJzgYgbLAi-QSX4A__',
},
{
id: 11,
daoName: 'Flare Dao',
members: '803k',
activeProps: '#2',
daoImage:
'https://s3-alpha-sig.figma.com/img/65a7/293b/904d2512e46a292be511bb312b01702b?Expires=1713744000&Key-Pair-Id=APKAQ4GOSFWCVNEHN3O4&Signature=A8To-owaEO7wVseKJzLXM-7sVTwXK5WYBrVBeE~bsB-TTXyHVJzyws2m2HhGIvn35MPqXyDPt1JsYX6-0rfdyCrGhIcJNNxkoYHEofhF2pKtI4foDmB6Cxbc4DW1pBA7Bpm4OHFtxKicAa18yJib~iRIb2s00DJSnEVVcNvoDjwOQ8R5sDjJrC0tOSHsk84GJveVf7PpGvnMtJaqpJ~IgtYDfvPiqEN2WzH~0EgTIbOs1Dx~lL5FolZSY7PekGw8o43DatU0qzBtUig7pCZW8pekW2ybInSm1ZeFUgDFZ-KJv-J2JQDgdeOxp-VXvKJXrcmO6WyJzgYgbLAi-QSX4A__',
},
];
const Communities = () => {
return (
Expand All @@ -116,7 +108,7 @@ const Communities = () => {
<Image src='/search.svg' alt='search icon' width={23} height={23} />
</div>
<div className='3xl:grid-cols-4 grid gap-14 px-12 py-4 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3'>
{data.map((dao) => (
{data.map((dao: DaoDetails) => (
<Community key={dao.id} daoDetails={dao} />
))}
</div>
Expand Down