Skip to content

Commit

Permalink
fix(table): project overview page table positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbeckers committed Aug 1, 2024
1 parent c3e62c2 commit 90cac38
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 93 deletions.
2 changes: 1 addition & 1 deletion packages/client/src/components/Filter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const Filters: React.FC<FiltersProps> = ({
onRefresh,
}) => {
return (
<div className="w-full flex gap-2 flex-wrap text-lg text-zinc-800 font-light leading-6">
<div className="w-full flex gap-2 flex-wrap justify-between text-lg text-zinc-800 font-light leading-6 py-2">
{filters.map(({ count, active, title, onFilterChange, disabled }) => (
<button
key={title}
Expand Down
181 changes: 89 additions & 92 deletions packages/client/src/views/Projects/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,105 +22,102 @@ const ProjectsView: React.FC = () => {
fetchProjects();
}, []);


const content = <section className="flex-1">
<List
columns={[
{title: "project", size: 4},
{title: "category", size: 2},
{title: "transaction counts", size: 3},
{title: "attestation counts", size: 3},
{title: "last updated", size: 2},
]}
items={projects}
onItemClick={(id) => {
console.log("Project", id);
push(`/projects/${id}`);
}}
/>
</section>

return (
<main className="flex flex-col gap-4 min-h-screen p-12">
<header className="w-full mx-auto max-w-screen-xl">
<h1 className="text-4xl font-semibold">Projects</h1>
<p className="mb-6">
Discover and explore the magic being built by fellow project builders
while tracking the impact metrics.
</p>
<Filters
filters={[
{
title: "Onchain Builders",
count: 25,
active: true,
onFilterChange: () => {
<main className="flex flex-row gap-4 min-h-screen p-12">
<div className="flex flex-col gap-4 w-full mx-auto">
<section className="w-full mx-auto max-w-screen-xl gap-4">
<h1 className="text-4xl font-semibold">Projects</h1>
<p className="mb-6">
Discover and explore the magic being built by fellow project builders
while tracking the impact metrics.
</p>
<Filters
filters={[
{
title: "Onchain Builders",
count: 25,
active: true,
onFilterChange: () => {
},
},
{
title: "OP Stack",
count: 0,
active: true,
onFilterChange: () => {
},
},
{
title: "Governance",
count: 0,
active: false,
onFilterChange: () => {
},
},
{
title: "Dev Tooling",
count: 25,
active: false,
onFilterChange: () => {
},
},
]}
sorts={[
{
label: "Name: A-Z",
value: "name",
},
},
{
title: "OP Stack",
count: 0,
active: true,
onFilterChange: () => {
{
label: "Most Attested",
value: "attested",
},
},
{
title: "Governance",
count: 0,
active: false,
onFilterChange: () => {
{
label: "Most Transacted",
value: "transacted",
},
},
{
title: "Dev Tooling",
count: 25,
active: false,
onFilterChange: () => {
{
label: "Latest - Oldest",
value: "latest",
},
},
]}
sorts={[
{
label: "Name: A-Z",
value: "name",
},
{
label: "Most Attested",
value: "attested",
},
{
label: "Most Transacted",
value: "transacted",
},
{
label: "Latest - Oldest",
value: "latest",
},
]}
activeSort="name"
refreshing={false}
onRefresh={() => {
}}
onSortChange={() => {
}}
/>
</header>
<div className="flex gap-4 w-full mx-auto max-w-screen-xl ">
{content}
<aside className="basis-72">
<div
className="rounded-xl p-6 w-full h-[460px] bg-no-repeat bg-cover bg-clip-padding bg-right-top bg-[url('/images/img-project-side.jpg')]">
<h3 className="text-2xl font-semibold mb-6">
Observe the impact of projects on the ecosystem
</h3>
<p className="text-base font-light">
Guided by proposed metrics from Impact evaluators. Project
builders, evaluators, and community members are actively shaping
these metrics by attesting to the outcomes on-chain
</p>
]}
activeSort="name"
refreshing={false}
onRefresh={() => {
}}
onSortChange={() => {
}}
/>
<div>
<List
columns={[
{title: "project", size: 4},
{title: "category", size: 2},
{title: "transaction counts", size: 3},
{title: "attestation counts", size: 3},
{title: "last updated", size: 2},
]}
items={projects}
onItemClick={(id) => {
console.log("Project", id);
push(`/projects/${id}`);
}}
/>
</div>
</aside>
</section>
</div>
<aside className="basis-60">
<div
className="rounded-xl p-6 w-full h-[460px] bg-no-repeat bg-cover bg-clip-padding bg-right-top bg-[url('/images/img-project-side.jpg')]">
<h3 className="text-2xl font-semibold mb-6">
Observe the impact of projects on the ecosystem
</h3>
<p className="text-base font-light">
Guided by proposed metrics from Impact evaluators. Project
builders, evaluators, and community members are actively shaping
these metrics by attesting to the outcomes on-chain
</p>
</div>
</aside>
</main>
);
};
Expand Down

0 comments on commit 90cac38

Please sign in to comment.