Skip to content

Commit

Permalink
feature(web): uses the new Page component
Browse files Browse the repository at this point in the history
Actually a WIP commit just for illustration how to use the new
Page component by replacing a few lines of code in L10nPage.
  • Loading branch information
dgdavid committed Sep 2, 2024
1 parent 46bda4a commit 0e02268
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions web/src/components/l10n/L10nPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

import React from "react";
import { Gallery, GalleryItem } from "@patternfly/react-core";
import { Link, CardField, Page } from "~/components/core";
import { Link, CardField } from "~/components/core";
import Page from "~/components/core/PageNext";
import { PATHS } from "~/routes/l10n";
import { _ } from "~/i18n";
import { useL10n } from "~/queries/l10n";
Expand All @@ -48,17 +49,17 @@ export default function L10nPage() {
<h2>{_("Localization")}</h2>
</Page.Header>

<Page.MainContent>
<Page.Content>
<Gallery hasGutter minWidths={{ default: "300px" }}>
<GalleryItem>
<Section
label={_("Language")}
<Page.Section
title={_("Language")}
value={locale ? `${locale.name} - ${locale.territory}` : _("Not selected yet")}
>
<Link to={PATHS.localeSelection} isPrimary={!locale}>
{locale ? _("Change") : _("Select")}
</Link>
</Section>
</Page.Section>
</GalleryItem>

<GalleryItem>
Expand All @@ -80,7 +81,7 @@ export default function L10nPage() {
</Section>
</GalleryItem>
</Gallery>
</Page.MainContent>
</Page.Content>
</Page>
);
}

0 comments on commit 0e02268

Please sign in to comment.