Skip to content

Commit

Permalink
Merge pull request #282 from GenomicDataInfrastructure/ART-5733/fix-l…
Browse files Browse the repository at this point in the history
…ayout

fix: layout
  • Loading branch information
brunopacheco1 authored Jul 8, 2024
2 parents 53c03eb + bda3877 commit 7d104af
Showing 1 changed file with 28 additions and 23 deletions.
51 changes: 28 additions & 23 deletions src/app/datasets/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2024 PNED G.I.E.
//
// SPDX-License-Identifier: Apache-2.0

import Error from "@/app/error";
import Chips from "@/components/Chips";
import PageContainer from "@/components/PageContainer";
Expand All @@ -18,31 +19,35 @@ export default async function Page({ params }: { params: { id: string } }) {
const dataset = await datasetGet(id);

return (
<PageContainer className="flex flex-col items-start justify-start lg:flex-row">
<div className="flex w-full flex-col gap-5 lg:w-2/3 lg:px-5">
<div className="flex w-full flex-col items-start justify-between lg:flex-row lg:items-center">
<PageHeading className="mb-4 w-2/3 lg:mb-0">
{dataset.title}
</PageHeading>
<AddToBasketBtn dataset={dataset} />
<PageContainer>
<div className="flex flex-col items-start justify-start lg:flex-row">
<div className="flex w-full flex-col gap-5 lg:w-2/3 lg:px-5">
<div className="flex w-full flex-col items-start justify-between lg:flex-row lg:items-center">
<PageHeading className="mb-4 w-2/3 lg:mb-0">
{dataset.title}
</PageHeading>
<AddToBasketBtn dataset={dataset} />
</div>
<p>{dataset.description}</p>
{dataset.themes?.length > 0 && (
<PageSubHeading>Themes</PageSubHeading>
)}
<Chips chips={dataset.themes.map((x) => x.label) || []} />
{dataset.keywords?.length > 0 && (
<PageSubHeading>Keywords</PageSubHeading>
)}
<Chips
chips={dataset.keywords?.map((keyword) => keyword.label) || []}
/>
{dataset.distributions.length > 0 && (
<PageSubHeading>Distributions</PageSubHeading>
)}
<DistributionAccordion
distributions={dataset.distributions || []}
/>
</div>
<p>{dataset.description}</p>
{dataset.themes?.length > 0 && (
<PageSubHeading>Themes</PageSubHeading>
)}
<Chips chips={dataset.themes.map((x) => x.label) || []} />
{dataset.keywords?.length > 0 && (
<PageSubHeading>Keywords</PageSubHeading>
)}
<Chips
chips={dataset.keywords?.map((keyword) => keyword.label) || []}
/>
{dataset.distributions.length > 0 && (
<PageSubHeading>Distributions</PageSubHeading>
)}
<DistributionAccordion distributions={dataset.distributions || []} />
<ClientSidebar dataset={dataset} />
</div>
<ClientSidebar dataset={dataset} />
</PageContainer>
);
} catch (error) {
Expand Down

0 comments on commit 7d104af

Please sign in to comment.