From 01a841b7a4783adb207321d48c273c55759ee983 Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Sat, 27 Apr 2024 16:39:11 +0300 Subject: [PATCH] Web: DocEditor: Added logo component. --- packages/doceditor/src/components/Root.tsx | 5 +--- .../src/components/deep-link/index.tsx | 30 +++---------------- 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/packages/doceditor/src/components/Root.tsx b/packages/doceditor/src/components/Root.tsx index 7f49ac9266..acddb00f76 100644 --- a/packages/doceditor/src/components/Root.tsx +++ b/packages/doceditor/src/components/Root.tsx @@ -35,7 +35,6 @@ import AppLoader from "@docspace/shared/components/app-loader"; import { TResponse } from "@/types"; import useError from "@/hooks/useError"; -import useDeviceType from "@/hooks/useDeviceType"; import useRootInit from "@/hooks/useRootInit"; import useDeepLink from "@/hooks/useDeepLink"; import useSelectFileDialog from "@/hooks/useSelectFileDialog"; @@ -85,7 +84,6 @@ const Root = ({ editorUrl: documentserverUrl, }); - const { currentDeviceType } = useDeviceType(); const { isShowDeepLink, setIsShowDeepLink } = useDeepLink({ settings, fileInfo, @@ -155,11 +153,10 @@ const Root = ({ selectFileDialogVisible, ]); - return isShowDeepLink ? ( + return true ? ( diff --git a/packages/doceditor/src/components/deep-link/index.tsx b/packages/doceditor/src/components/deep-link/index.tsx index ba264aa698..9d6f42c423 100644 --- a/packages/doceditor/src/components/deep-link/index.tsx +++ b/packages/doceditor/src/components/deep-link/index.tsx @@ -35,12 +35,9 @@ import { Button, ButtonSize } from "@docspace/shared/components/button"; import { Link, LinkType } from "@docspace/shared/components/link"; import { FormWrapper } from "@docspace/shared/components/form-wrapper"; import { getBgPattern } from "@docspace/shared/utils/common"; -import { getLogoUrl } from "@docspace/shared/utils"; -import { DeviceType, WhiteLabelLogoType } from "@docspace/shared/enums"; import { getDeepLink } from "./DeepLink.helper"; import { - StyledSimpleNav, StyledDeepLink, StyledBodyWrapper, StyledFileTile, @@ -50,12 +47,12 @@ import { LogoWrapper, } from "./DeepLink.styled"; import { DeepLinkProps } from "./DeepLink.types"; +import DocspaceLogo from "@docspace/shared/components/docspace-logo/DocspaceLogo"; const DeepLink = ({ fileInfo, userEmail, setIsShowDeepLink, - currentDeviceType, deepLinkConfig, }: DeepLinkProps) => { const { t } = useTranslation(["DeepLink", "Common"]); @@ -95,31 +92,13 @@ const DeepLink = ({ : fileInfo?.title || ""; }; - const renderLogo = () => { - const logo = getLogoUrl(WhiteLabelLogoType.LightSmall, !theme.isBase); - - if (currentDeviceType === DeviceType.mobile) { - return ( - - - - ); - } else { - return ( - - docspace-logo - - ); - } - }; - const bgPattern = getBgPattern(theme.currentColorScheme?.id); - const logoElement = renderLogo(); - return ( - {logoElement} + + + @@ -164,4 +143,3 @@ const DeepLink = ({ }; export default DeepLink; -