Login:Src:App: remove LanguageComboboxWrapper from pages

This commit is contained in:
Darya Umrikhina 2024-08-22 16:10:31 +04:00
parent 0e18195770
commit 51b6b8a99a
3 changed files with 38 additions and 70 deletions

View File

@ -25,7 +25,6 @@
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import { notFound } from "next/navigation";
import dynamic from "next/dynamic";
import { cookies, headers } from "next/headers";
import { FormWrapper } from "@docspace/shared/components/form-wrapper";
@ -42,13 +41,6 @@ import {
getUserFromConfirm,
} from "@/utils/actions";
const LanguageComboboxWrapper = dynamic(
() => import("@/components/LanguageCombobox"),
{
ssr: false,
},
);
type LinkInviteProps = {
searchParams: { [key: string]: string };
params: { Invite: string };
@ -81,31 +73,28 @@ async function Page({ searchParams, params }: LinkInviteProps) {
return (
<>
<div className="content-top">
<LanguageComboboxWrapper />
{settings && typeof settings !== "string" && (
<>
<GreetingCreateUserContainer
type={type}
{settings && typeof settings !== "string" && (
<>
<GreetingCreateUserContainer
type={type}
firstName={user?.firstName}
lastName={user?.lastName}
culture={culture}
hostName={hostName}
/>
<FormWrapper id="invite-form">
<CreateUserForm
userNameRegex={settings.userNameRegex}
passwordHash={settings.passwordHash}
firstName={user?.firstName}
lastName={user?.lastName}
culture={culture}
hostName={hostName}
passwordSettings={passwordSettings}
capabilities={capabilities}
thirdPartyProviders={thirdParty}
/>
<FormWrapper id="invite-form">
<CreateUserForm
userNameRegex={settings.userNameRegex}
passwordHash={settings.passwordHash}
firstName={user?.firstName}
lastName={user?.lastName}
passwordSettings={passwordSettings}
capabilities={capabilities}
thirdPartyProviders={thirdParty}
/>
</FormWrapper>
</>
)}
</div>
</FormWrapper>
</>
)}
</>
);
}

View File

@ -42,14 +42,6 @@ import { GreetingLoginContainer } from "@/components/GreetingContainer";
import { FormWrapper } from "@docspace/shared/components/form-wrapper";
import { ColorTheme, ThemeId } from "@docspace/shared/components/color-theme";
import { cookies } from "next/headers";
import dynamic from "next/dynamic";
const LanguageComboboxWrapper = dynamic(
() => import("@/components/LanguageCombobox"),
{
ssr: false,
},
);
async function Page({
searchParams,
@ -91,7 +83,6 @@ async function Page({
return (
<>
<LanguageComboboxWrapper />
{settings && typeof settings !== "string" && (
<ColorTheme
themeId={ThemeId.LinkForgotPassword}

View File

@ -24,8 +24,6 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import dynamic from "next/dynamic";
import { ColorTheme, ThemeId } from "@docspace/shared/components/color-theme";
import { FormWrapper } from "@docspace/shared/components/form-wrapper";
@ -40,13 +38,6 @@ import {
getPortalCultures,
} from "@/utils/actions";
const LanguageComboboxWrapper = dynamic(
() => import("@/components/LanguageCombobox"),
{
ssr: false,
},
);
async function Page() {
const settings = await getSettings();
@ -67,29 +58,26 @@ async function Page() {
]);
return (
<>
<LanguageComboboxWrapper />
<ColorTheme themeId={ThemeId.LinkForgotPassword}>
<>
<GreetingContainer
greetingSettings={objectSettings?.greetingSettings}
welcomeTitle="Wizard:WelcomeTitle"
<ColorTheme themeId={ThemeId.LinkForgotPassword}>
<>
<GreetingContainer
greetingSettings={objectSettings?.greetingSettings}
welcomeTitle="Wizard:WelcomeTitle"
/>
<FormWrapper id="wizard-form">
<WizardForm
passwordSettings={passwordSettings}
machineName={machineName}
isRequiredLicense={isRequiredLicense}
portalCultures={portalCultures}
portalTimeZones={portalTimeZones}
culture={objectSettings?.culture}
wizardToken={objectSettings?.wizardToken}
passwordHash={objectSettings?.passwordHash}
/>
<FormWrapper id="wizard-form">
<WizardForm
passwordSettings={passwordSettings}
machineName={machineName}
isRequiredLicense={isRequiredLicense}
portalCultures={portalCultures}
portalTimeZones={portalTimeZones}
culture={objectSettings?.culture}
wizardToken={objectSettings?.wizardToken}
passwordHash={objectSettings?.passwordHash}
/>
</FormWrapper>
</>
</ColorTheme>
</>
</FormWrapper>
</>
</ColorTheme>
);
}