Skip to content

Commit

Permalink
Move "source" section to the flatpage last item
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrucs committed Jun 5, 2024
1 parent 7e1e153 commit 577d2a4
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions frontend/src/components/pages/flatPage/FlatPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,26 +143,9 @@ export const FlatPageUI: React.FC<FlatPageUIProps> = ({ flatPageUrl }) => {
{parsedFlatPage}
</div>
)}
{flatPage.sources.length > 0 && (
<>
<Separator />
<DetailsSection className="mb-10" titleId="details.source">
<div>
{flatPage.sources.map((source, i) => (
<DetailsSource
key={i}
name={source.name}
website={source.website}
pictogramUri={source.pictogramUri}
/>
))}
</div>
</DetailsSection>
</>
)}
{flatPage.children && flatPage.children.length > 0 && (
<>
{flatPage.sources.length === 0 && <Separator />}
<Separator />
<h2 className="my-6 desktop:my-10 text-Mobile-H1 desktop:text-H2 font-bold">
<FormattedMessage id="page.children.title" />
</h2>
Expand All @@ -189,6 +172,21 @@ export const FlatPageUI: React.FC<FlatPageUIProps> = ({ flatPageUrl }) => {
</ul>
</>
)}
{flatPage.sources.length > 0 && (
<>
<Separator />
<DetailsSection className="mb-10" titleId="details.source">
{flatPage.sources.map((source, i) => (
<DetailsSource
key={i}
name={source.name}
website={source.website}
pictogramUri={source.pictogramUri}
/>
))}
</DetailsSection>
</>
)}
</div>
<Footer />
</div>
Expand Down

0 comments on commit 577d2a4

Please sign in to comment.