From e6741fcab96be3b0dd6dbd032eb3fa5714d1b5c8 Mon Sep 17 00:00:00 2001 From: Darya Umrikhina Date: Mon, 29 Jul 2024 12:13:10 +0400 Subject: [PATCH] Login:Components:ChangeOwnerForm: add use client and change imports --- .../ChangeOwnerForm/ChangeOwner.styled.tsx | 2 ++ .../login/src/components/ChangeOwnerForm/index.tsx | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/login/src/components/ChangeOwnerForm/ChangeOwner.styled.tsx b/packages/login/src/components/ChangeOwnerForm/ChangeOwner.styled.tsx index 5859e83584..71588d094b 100644 --- a/packages/login/src/components/ChangeOwnerForm/ChangeOwner.styled.tsx +++ b/packages/login/src/components/ChangeOwnerForm/ChangeOwner.styled.tsx @@ -24,6 +24,8 @@ // 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 +"use client"; + import styled from "styled-components"; export const ButtonsWrapper = styled.div` diff --git a/packages/login/src/components/ChangeOwnerForm/index.tsx b/packages/login/src/components/ChangeOwnerForm/index.tsx index 32b2ad2c3a..19d44c3699 100644 --- a/packages/login/src/components/ChangeOwnerForm/index.tsx +++ b/packages/login/src/components/ChangeOwnerForm/index.tsx @@ -26,18 +26,21 @@ "use client"; -import { ConfirmRouteContext } from "@/app/(root)/confirm/confirmRoute"; -import withLoader from "@/app/(root)/confirm/withLoader"; +import { useContext, useState } from "react"; +import { useTranslation } from "react-i18next"; + import { Button, ButtonSize } from "@docspace/shared/components/button"; import { Text } from "@docspace/shared/components/text"; import { toastr } from "@docspace/shared/components/toast"; import { PRODUCT_NAME } from "@docspace/shared/constants"; -import { useContext, useEffect, useState } from "react"; -import { useTranslation } from "react-i18next"; -import { ButtonsWrapper } from "./ChangeOwner.styled"; + +import { ConfirmRouteContext } from "@/app/(root)/confirm/confirmRoute"; +import withLoader from "@/app/(root)/confirm/withLoader"; import { TError, WithLoaderProps } from "@/types"; import { ownerChange } from "@/utils/actions"; +import { ButtonsWrapper } from "./ChangeOwner.styled"; + type ChangeOwnerFormProps = { newOwner?: string; } & WithLoaderProps;