mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: create new project as fav (#1993)
This commit is contained in:
parent
a9ff4b8c93
commit
9f420a00d7
@ -31,6 +31,7 @@ import { useMobxStore } from "lib/mobx/store-provider";
|
|||||||
export const ProjectSidebarList: FC = () => {
|
export const ProjectSidebarList: FC = () => {
|
||||||
const store: any = useMobxStore();
|
const store: any = useMobxStore();
|
||||||
|
|
||||||
|
const [isFavoriteProjectCreate, setIsFavoriteProjectCreate] = useState(false);
|
||||||
const [isProjectModalOpen, setIsProjectModalOpen] = useState(false);
|
const [isProjectModalOpen, setIsProjectModalOpen] = useState(false);
|
||||||
const [deleteProjectModal, setDeleteProjectModal] = useState(false);
|
const [deleteProjectModal, setDeleteProjectModal] = useState(false);
|
||||||
const [projectToDelete, setProjectToDelete] = useState<IProject | null>(null);
|
const [projectToDelete, setProjectToDelete] = useState<IProject | null>(null);
|
||||||
@ -151,7 +152,7 @@ export const ProjectSidebarList: FC = () => {
|
|||||||
<CreateProjectModal
|
<CreateProjectModal
|
||||||
isOpen={isProjectModalOpen}
|
isOpen={isProjectModalOpen}
|
||||||
setIsOpen={setIsProjectModalOpen}
|
setIsOpen={setIsProjectModalOpen}
|
||||||
setToFavorite
|
setToFavorite={isFavoriteProjectCreate}
|
||||||
user={user}
|
user={user}
|
||||||
/>
|
/>
|
||||||
<DeleteProjectModal
|
<DeleteProjectModal
|
||||||
@ -189,7 +190,10 @@ export const ProjectSidebarList: FC = () => {
|
|||||||
</Disclosure.Button>
|
</Disclosure.Button>
|
||||||
<button
|
<button
|
||||||
className="group-hover:opacity-100 opacity-0"
|
className="group-hover:opacity-100 opacity-0"
|
||||||
onClick={() => setIsProjectModalOpen(true)}
|
onClick={() => {
|
||||||
|
setIsFavoriteProjectCreate(true);
|
||||||
|
setIsProjectModalOpen(true);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Icon iconName="add" />
|
<Icon iconName="add" />
|
||||||
</button>
|
</button>
|
||||||
@ -252,7 +256,10 @@ export const ProjectSidebarList: FC = () => {
|
|||||||
</Disclosure.Button>
|
</Disclosure.Button>
|
||||||
<button
|
<button
|
||||||
className="group-hover:opacity-100 opacity-0"
|
className="group-hover:opacity-100 opacity-0"
|
||||||
onClick={() => setIsProjectModalOpen(true)}
|
onClick={() => {
|
||||||
|
setIsFavoriteProjectCreate(false);
|
||||||
|
setIsProjectModalOpen(true);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Icon iconName="add" />
|
<Icon iconName="add" />
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user