diff --git a/packages/ui/src/button/helper.tsx b/packages/ui/src/button/helper.tsx index 0378b0334..ae9e85359 100644 --- a/packages/ui/src/button/helper.tsx +++ b/packages/ui/src/button/helper.tsx @@ -44,9 +44,9 @@ export const buttonStyling: IButtonStyling = { disabled: `cursor-not-allowed !bg-custom-primary-60 hover:bg-custom-primary-60`, }, "accent-primary": { - default: `bg-custom-primary-10 text-custom-primary-100`, - hover: `hover:bg-custom-primary-20 hover:text-custom-primary-200`, - pressed: `focus:bg-custom-primary-20`, + default: `bg-custom-primary-100/20 text-custom-primary-100`, + hover: `hover:bg-custom-primary-100/10 hover:text-custom-primary-200`, + pressed: `focus:bg-custom-primary-100/10`, disabled: `cursor-not-allowed !text-custom-primary-60`, }, "outline-primary": { diff --git a/web/components/onboarding/create-or-join-workspaces.tsx b/web/components/onboarding/create-or-join-workspaces.tsx index 1f0bd5c69..b88857186 100644 --- a/web/components/onboarding/create-or-join-workspaces.tsx +++ b/web/components/onboarding/create-or-join-workspaces.tsx @@ -6,7 +6,7 @@ import { useTheme } from "next-themes"; // types import { IWorkspaceMemberInvitation, TOnboardingSteps } from "@plane/types"; // components -import { Invitations, OnboardingHeader, SwitchOrDeleteAccountDropdown, CreateWorkspace } from "@/components/onboarding"; +import { Invitations, OnboardingHeader, SwitchAccountDropdown, CreateWorkspace } from "@/components/onboarding"; // hooks import { useUser } from "@/hooks/store"; // assets @@ -55,7 +55,7 @@ export const CreateOrJoinWorkspaces: React.FC = observer((props) => {
- +
@@ -79,7 +79,7 @@ export const CreateOrJoinWorkspaces: React.FC = observer((props) => {
- +
Promise; @@ -366,7 +366,7 @@ export const InviteMembers: React.FC = (props) => { {/* Since this will always be the last step */}
- +
@@ -433,7 +433,7 @@ export const InviteMembers: React.FC = (props) => {
- +
= observer((props) => {
- +
@@ -567,7 +567,7 @@ export const ProfileSetup: React.FC = observer((props) => {
- +
{profileSetupStep === EProfileSetupSteps.USER_PERSONALIZATION ? ( = observer((props) => { +export const SwitchAccountDropdown: FC = observer((props) => { const { fullName } = props; // states - const [showDeleteAccountModal, setShowDeleteAccountModal] = useState(false); + const [showSwitchAccountModal, setShowSwitchAccountModal] = useState(false); // store hooks const { data: user } = useUser(); @@ -30,7 +30,7 @@ export const SwitchOrDeleteAccountDropdown: FC - setShowDeleteAccountModal(false)} /> + setShowSwitchAccountModal(false)} />
{user?.avatar && ( setShowDeleteAccountModal(true)} + onClick={() => setShowSwitchAccountModal(true)} > Wrong e-mail address? diff --git a/web/components/onboarding/switch-delete-account-modal.tsx b/web/components/onboarding/switch-account-modal.tsx similarity index 61% rename from web/components/onboarding/switch-delete-account-modal.tsx rename to web/components/onboarding/switch-account-modal.tsx index bfa17387f..35f23588d 100644 --- a/web/components/onboarding/switch-delete-account-modal.tsx +++ b/web/components/onboarding/switch-account-modal.tsx @@ -1,34 +1,31 @@ import React, { useState } from "react"; import { useRouter } from "next/router"; import { useTheme } from "next-themes"; -import { mutate } from "swr"; -import { Trash2 } from "lucide-react"; +import { ArrowRightLeft } from "lucide-react"; import { Dialog, Transition } from "@headlessui/react"; -// hooks -import { Button, TOAST_TYPE, setToast } from "@plane/ui"; -import { useUser } from "@/hooks/store"; // ui +import { Button, TOAST_TYPE, setToast } from "@plane/ui"; +// hooks +import { useUser } from "@/hooks/store"; type Props = { isOpen: boolean; onClose: () => void; }; -export const SwitchOrDeleteAccountModal: React.FC = (props) => { +export const SwitchAccountModal: React.FC = (props) => { const { isOpen, onClose } = props; // states const [switchingAccount, setSwitchingAccount] = useState(false); - const [isDeactivating, setIsDeactivating] = useState(false); // router const router = useRouter(); // store hooks - const { signOut, deactivateAccount } = useUser(); + const { data: userData, signOut } = useUser(); const { setTheme } = useTheme(); const handleClose = () => { setSwitchingAccount(false); - setIsDeactivating(false); onClose(); }; @@ -51,32 +48,6 @@ export const SwitchOrDeleteAccountModal: React.FC = (props) => { .finally(() => setSwitchingAccount(false)); }; - const handleDeactivateAccount = async () => { - setIsDeactivating(true); - - await deactivateAccount() - .then(() => { - setToast({ - type: TOAST_TYPE.SUCCESS, - title: "Success!", - message: "Account deleted successfully.", - }); - mutate("CURRENT_USER_DETAILS", null); - signOut(); - setTheme("system"); - router.push("/"); - handleClose(); - }) - .catch((err: any) => - setToast({ - type: TOAST_TYPE.ERROR, - title: "Error!", - message: err?.error, - }) - ) - .finally(() => setIsDeactivating(false)); - }; - return ( @@ -104,32 +75,30 @@ export const SwitchOrDeleteAccountModal: React.FC = (props) => { leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > -
-
-
-
-