|
1 | | -import React, { useState } from "react"; |
| 1 | +import { useState } from "react"; |
2 | 2 | import { observer } from "mobx-react"; |
3 | | -import Link from "next/link"; |
4 | | -import { useParams } from "next/navigation"; |
5 | 3 | import { Controller, useForm } from "react-hook-form"; |
6 | | -import { CircleUserRound, InfoIcon } from "lucide-react"; |
| 4 | +import { CircleUserRound } from "lucide-react"; |
7 | 5 | import { Disclosure, Transition } from "@headlessui/react"; |
8 | 6 | // plane imports |
9 | 7 | import { PROFILE_SETTINGS_TRACKER_ELEMENTS, PROFILE_SETTINGS_TRACKER_EVENTS } from "@plane/constants"; |
10 | 8 | import { useTranslation } from "@plane/i18n"; |
11 | | -import { Button, getButtonStyling } from "@plane/propel/button"; |
| 9 | +import { Button } from "@plane/propel/button"; |
12 | 10 | import { ChevronDownIcon } from "@plane/propel/icons"; |
13 | 11 | import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/propel/toast"; |
14 | 12 | import { EFileAssetType } from "@plane/types"; |
15 | 13 | import type { IUser, TUserProfile } from "@plane/types"; |
16 | 14 | import { Input } from "@plane/ui"; |
17 | | -import { cn, getFileURL } from "@plane/utils"; |
| 15 | +import { getFileURL } from "@plane/utils"; |
18 | 16 | // components |
19 | 17 | import { DeactivateAccountModal } from "@/components/account/deactivate-account-modal"; |
20 | 18 | import { ImagePickerPopover } from "@/components/core/image-picker-popover"; |
@@ -49,7 +47,6 @@ export type TProfileFormProps = { |
49 | 47 |
|
50 | 48 | export const ProfileForm = observer(function ProfileForm(props: TProfileFormProps) { |
51 | 49 | const { user, profile } = props; |
52 | | - const { workspaceSlug } = useParams(); |
53 | 50 | // states |
54 | 51 | const [isLoading, setIsLoading] = useState(false); |
55 | 52 | const [isImageUploadModalOpen, setIsImageUploadModalOpen] = useState(false); |
@@ -100,6 +97,7 @@ export const ProfileForm = observer(function ProfileForm(props: TProfileFormProp |
100 | 97 | message: "Profile picture deleted successfully.", |
101 | 98 | }); |
102 | 99 | setValue("avatar_url", ""); |
| 100 | + return; |
103 | 101 | }) |
104 | 102 | .catch(() => { |
105 | 103 | setToast({ |
@@ -169,6 +167,7 @@ export const ProfileForm = observer(function ProfileForm(props: TProfileFormProp |
169 | 167 | captureSuccess({ |
170 | 168 | eventName: PROFILE_SETTINGS_TRACKER_EVENTS.update_profile, |
171 | 169 | }); |
| 170 | + return; |
172 | 171 | }) |
173 | 172 | .catch(() => { |
174 | 173 | captureError({ |
@@ -198,16 +197,6 @@ export const ProfileForm = observer(function ProfileForm(props: TProfileFormProp |
198 | 197 | /> |
199 | 198 | )} |
200 | 199 | /> |
201 | | - <div className="w-full flex text-accent-secondary bg-accent-primary/10 rounded-md p-2 gap-2 items-center mb-4"> |
202 | | - <InfoIcon className="h-4 w-4 flex-shrink-0" /> |
203 | | - <div className="text-13 font-medium flex-1">{t("settings_moved_to_preferences")}</div> |
204 | | - <Link |
205 | | - href={`/${workspaceSlug}/settings/account/preferences`} |
206 | | - className={cn(getButtonStyling("secondary", "base"))} |
207 | | - > |
208 | | - {t("go_to_preferences")} |
209 | | - </Link> |
210 | | - </div> |
211 | 200 | <form onSubmit={handleSubmit(onSubmit)} className="w-full"> |
212 | 201 | <div className="flex w-full flex-col gap-6"> |
213 | 202 | <div className="relative h-44 w-full"> |
|
0 commit comments