1- import { useState } from "react" ;
1+ import { PROJECT_TRACKER_EVENTS } from "@plane/constants" ;
2+ import { useTranslation } from "@plane/i18n" ;
23import { observer } from "mobx-react" ;
4+ import { useState } from "react" ;
35import { FormProvider , useForm } from "react-hook-form" ;
4- import { PROJECT_TRACKER_EVENTS , RANDOM_EMOJI_CODES } from "@plane/constants" ;
5- import { useTranslation } from "@plane/i18n" ;
66// ui
77import { TOAST_TYPE , setToast } from "@plane/propel/toast" ;
88import { EFileAssetType } from "@plane/types" ;
9- import type { IProject } from "@plane/types" ;
109// constants
1110import ProjectCommonAttributes from "@/components/project/create/common-attributes" ;
1211import ProjectCreateHeader from "@/components/project/create/header" ;
1312import ProjectCreateButtons from "@/components/project/create/project-create-buttons" ;
1413// hooks
15- import { DEFAULT_COVER_IMAGE_URL , getCoverImageType , uploadCoverImage } from "@/helpers/cover-image.helper" ;
14+ import { getCoverImageType , uploadCoverImage } from "@/helpers/cover-image.helper" ;
1615import { captureError , captureSuccess } from "@/helpers/event-tracker.helper" ;
1716import { useProject } from "@/hooks/store/use-project" ;
1817import { usePlatformOS } from "@/hooks/use-platform-os" ;
1918// plane web types
2019import type { TProject } from "@/plane-web/types/projects" ;
21- import ProjectAttributes from "./attributes" ;
20+ import { ProjectAttributes } from "./attributes" ;
2221import { getProjectFormValues } from "./utils" ;
2322
2423export type TCreateProjectFormProps = {
@@ -37,7 +36,7 @@ export const CreateProjectForm = observer(function CreateProjectForm(props: TCre
3736 const { t } = useTranslation ( ) ;
3837 const { addProjectToFavorites, createProject, updateProject } = useProject ( ) ;
3938 // states
40- const [ isChangeInIdentifierRequired , setIsChangeInIdentifierRequired ] = useState ( true ) ;
39+ const [ shouldAutoSyncIdentifier , setShouldAutoSyncIdentifier ] = useState ( true ) ;
4140 // form info
4241 const methods = useForm < TProject > ( {
4342 defaultValues : { ...getProjectFormValues ( ) , ...data } ,
@@ -167,7 +166,7 @@ export const CreateProjectForm = observer(function CreateProjectForm(props: TCre
167166
168167 const handleClose = ( ) => {
169168 onClose ( ) ;
170- setIsChangeInIdentifierRequired ( true ) ;
169+ setShouldAutoSyncIdentifier ( true ) ;
171170 setTimeout ( ( ) => {
172171 reset ( ) ;
173172 } , 300 ) ;
@@ -182,8 +181,8 @@ export const CreateProjectForm = observer(function CreateProjectForm(props: TCre
182181 < ProjectCommonAttributes
183182 setValue = { setValue }
184183 isMobile = { isMobile }
185- isChangeInIdentifierRequired = { isChangeInIdentifierRequired }
186- setIsChangeInIdentifierRequired = { setIsChangeInIdentifierRequired }
184+ shouldAutoSyncIdentifier = { shouldAutoSyncIdentifier }
185+ setShouldAutoSyncIdentifier = { setShouldAutoSyncIdentifier }
187186 />
188187 < ProjectAttributes isMobile = { isMobile } />
189188 </ div >
0 commit comments