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";
import React, { useLayoutEffect, useState } from "react";
import { Trans, useTranslation } from "react-i18next";
import { useSearchParams } from "next/navigation";
import React from "react";
import { useTranslation } from "react-i18next";
import { useTheme } from "styled-components";
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 { getLogoUrl } from "@docspace/shared/utils/common";
import { GreetingContainersProps, TConfirmLinkParams } from "@/types";
import { DEFAULT_PORTAL_TEXT, DEFAULT_ROOM_TEXT } from "@/utils/constants";
import { getInvitationLinkData } from "@/utils";
import { GreetingContainersProps } from "@/types";
export const GreetingContainer = ({
greetingSettings,

View File

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

View File

@ -38,7 +38,7 @@ import { PRODUCT_NAME } from "@docspace/shared/constants";
import { WhiteLabelLogoType } from "@docspace/shared/enums";
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";

View File

@ -24,6 +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
export { GreetingCleateUserContainer } from "./GreetingCreateUserContainer";
export { GreetingCleateUserContainer } from "./GreetingCreateUserContainer/GreetingCreateUserContainer";
export { GreetingLoginContainer } from "./GreetingLoginContainer";
export { GreetingContainer } from "./GreetingContainer";