Skip to content

Commit

Permalink
Amend localisation configuration layout
Browse files Browse the repository at this point in the history
  • Loading branch information
cychiuae committed Jun 14, 2024
1 parent a149123 commit 850fb3c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.titleContainer {
.descriptionContainer {
display: flex;
flex-direction: row;
justify-content: space-between;
Expand Down
16 changes: 9 additions & 7 deletions portal/src/graphql/portal/LocalizationConfigurationScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useCallback, useContext, useMemo, useState } from "react";
import { useParams } from "react-router-dom";
import { Pivot, PivotItem } from "@fluentui/react";
import cn from "classnames";
import { Context, FormattedMessage } from "@oursky/react-messageformat";
import ShowLoading from "../../ShowLoading";
import ShowError from "../../ShowError";
Expand Down Expand Up @@ -677,21 +678,22 @@ const ResourcesConfigurationContent: React.VFC<ResourcesConfigurationContentProp

return (
<ScreenContent>
<div className={styles.titleContainer}>
<ScreenTitle>
<FormattedMessage id="LocalizationConfigurationScreen.title" />
</ScreenTitle>
<ScreenTitle className={cn("col-span-8", "tablet:col-span-full")}>
<FormattedMessage id="LocalizationConfigurationScreen.title" />
</ScreenTitle>
<div className={styles.descriptionContainer}>
<ScreenDescription className={styles.widget}>
<FormattedMessage id="LocalizationConfigurationScreen.description" />
</ScreenDescription>
<ManageLanguageWidget
showLabel={false}
existingLanguages={initialSupportedLanguages}
supportedLanguages={supportedLanguages}
selectedLanguage={state.selectedLanguage}
fallbackLanguage={state.fallbackLanguage}
onChangeSelectedLanguage={setSelectedLanguage}
/>
</div>
<ScreenDescription className={styles.widget}>
<FormattedMessage id="LocalizationConfigurationScreen.description" />
</ScreenDescription>
{/* Code editors might incorrectly fire change events when changing language
Set key to selectedLanguage to ensure code editors always remount */}
<Widget className={styles.widget} key={state.selectedLanguage}>
Expand Down

0 comments on commit 850fb3c

Please sign in to comment.