Login:Components:GreetingContainer: add types and change imports

This commit is contained in:
Darya Umrikhina 2024-07-23 01:46:50 +04:00
parent 6fcdbd39b2
commit 8d90e90c95
5 changed files with 19 additions and 17 deletions

View File

@ -28,9 +28,8 @@
"use client"; "use client";
import React, { useLayoutEffect, useState } from "react"; import React from "react";
import { Trans, useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useSearchParams } from "next/navigation";
import { useTheme } from "styled-components"; import { useTheme } from "styled-components";
import { Text } from "@docspace/shared/components/text"; import { Text } from "@docspace/shared/components/text";
@ -38,9 +37,7 @@ import { PRODUCT_NAME } from "@docspace/shared/constants";
import { WhiteLabelLogoType } from "@docspace/shared/enums"; import { WhiteLabelLogoType } from "@docspace/shared/enums";
import { getLogoUrl } from "@docspace/shared/utils/common"; import { getLogoUrl } from "@docspace/shared/utils/common";
import { GreetingContainersProps, TConfirmLinkParams } from "@/types"; import { GreetingContainersProps } from "@/types";
import { DEFAULT_PORTAL_TEXT, DEFAULT_ROOM_TEXT } from "@/utils/constants";
import { getInvitationLinkData } from "@/utils";
export const GreetingContainer = ({ export const GreetingContainer = ({
greetingSettings, greetingSettings,

View File

@ -28,28 +28,33 @@
"use client"; "use client";
import { Text } from "@docspace/shared/components/text"; import { useContext } from "react";
import { PRODUCT_NAME } from "@docspace/shared/constants";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { useTheme } from "styled-components"; import { useTheme } from "styled-components";
import { Text } from "@docspace/shared/components/text";
import { PRODUCT_NAME } from "@docspace/shared/constants";
import { getLogoUrl } from "@docspace/shared/utils"; import { getLogoUrl } from "@docspace/shared/utils";
import { WhiteLabelLogoType } from "@docspace/shared/enums"; import { WhiteLabelLogoType } from "@docspace/shared/enums";
import { useContext, useEffect, useState } from "react";
import { ConfirmRouteContext } from "@/app/(root)/confirm/confirmRoute"; import { ConfirmRouteContext } from "@/app/(root)/confirm/confirmRoute";
import { DEFAULT_PORTAL_TEXT, DEFAULT_ROOM_TEXT } from "@/utils/constants";
import { GreetingContainer } from "./GreetingCleateUserContainer.styled"; import { GreetingContainer } from "./GreetingCleateUserContainer.styled";
// remove type GreetingCleateUserContainerProps = {
const DEFAULT_ROOM_TEXT = type: string;
"<strong>{{firstName}} {{lastName}}</strong> invites you to join the room <strong>{{roomName}}</strong> for secure document collaboration."; firstName?: string;
const DEFAULT_PORTAL_TEXT = lastName?: string;
"<strong>{{firstName}} {{lastName}}</strong> invites you to join the room <strong>{{roomName}}</strong> for secure document collaboration."; hostName: string | null;
};
export const GreetingCleateUserContainer = ({ export const GreetingCleateUserContainer = ({
type, type,
firstName, firstName,
lastName, lastName,
hostName, hostName,
}) => { }: GreetingCleateUserContainerProps) => {
const { t } = useTranslation(["Confirm", "Common"]); const { t } = useTranslation(["Confirm", "Common"]);
const theme = useTheme(); const theme = useTheme();
const { roomData } = useContext(ConfirmRouteContext); const { roomData } = useContext(ConfirmRouteContext);

View File

@ -38,7 +38,7 @@ import { PRODUCT_NAME } from "@docspace/shared/constants";
import { WhiteLabelLogoType } from "@docspace/shared/enums"; import { WhiteLabelLogoType } from "@docspace/shared/enums";
import { getLogoUrl } from "@docspace/shared/utils/common"; import { getLogoUrl } from "@docspace/shared/utils/common";
import { GreetingContainersProps, TConfirmLinkParams } from "@/types"; import { GreetingContainersProps } from "@/types";
import { DEFAULT_PORTAL_TEXT, DEFAULT_ROOM_TEXT } from "@/utils/constants"; import { DEFAULT_PORTAL_TEXT, DEFAULT_ROOM_TEXT } from "@/utils/constants";
import { getInvitationLinkData } from "@/utils"; import { getInvitationLinkData } from "@/utils";

View File

@ -24,6 +24,6 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // 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 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
export { GreetingCleateUserContainer } from "./GreetingCreateUserContainer"; export { GreetingCleateUserContainer } from "./GreetingCreateUserContainer/GreetingCreateUserContainer";
export { GreetingLoginContainer } from "./GreetingLoginContainer"; export { GreetingLoginContainer } from "./GreetingLoginContainer";
export { GreetingContainer } from "./GreetingContainer"; export { GreetingContainer } from "./GreetingContainer";