Login:Src:Components: change Layout components

This commit is contained in:
Darya Umrikhina 2024-07-11 17:31:20 +04:00
parent 592c84f5fb
commit a3e175432a
2 changed files with 14 additions and 5 deletions

View File

@ -41,8 +41,11 @@ import { GreetingContainersProps } from "@/types";
import { DEFAULT_PORTAL_TEXT, DEFAULT_ROOM_TEXT } from "@/utils/constants";
import { getInvitationLinkData } from "@/utils";
const GreetingContainer = ({ greetingSettings }: GreetingContainersProps) => {
const { t } = useTranslation(["Login"]);
const GreetingContainer = ({
greetingSettings,
wizardToken,
}: GreetingContainersProps) => {
const { t } = useTranslation(["Login", "Wizard"]);
const theme = useTheme();
const logoUrl = getLogoUrl(WhiteLabelLogoType.LoginPage, !theme.isBase);
@ -84,7 +87,9 @@ const GreetingContainer = ({ greetingSettings }: GreetingContainersProps) => {
textAlign="center"
className="greeting-title"
>
{greetingSettings}
{wizardToken
? t("Wizard:WelcomeTitle", { productName: PRODUCT_NAME })
: greetingSettings}
</Text>
)}

View File

@ -64,9 +64,13 @@ StyledSimpleNav.defaultProps = { theme: Base };
interface SimpleNavProps {
systemTheme: ThemeKeys;
isLanguageComboboxVisible?: boolean;
}
const SimpleNav = ({ systemTheme }: SimpleNavProps) => {
const SimpleNav = ({
systemTheme,
isLanguageComboboxVisible = true,
}: SimpleNavProps) => {
const theme = useTheme();
const isDark = !theme.isBase;
const logoUrl = getLogoUrl(WhiteLabelLogoType.LightSmall, isDark);
@ -74,7 +78,7 @@ const SimpleNav = ({ systemTheme }: SimpleNavProps) => {
return (
<StyledSimpleNav id="login-header">
<img src={logoUrl} alt="logo-url" />
<LanguageComboboxWrapper />
{isLanguageComboboxVisible && <LanguageComboboxWrapper />}
</StyledSimpleNav>
);
};