Skip to content

Commit

Permalink
fix: create new project as fav (#1993)
Browse files Browse the repository at this point in the history
  • Loading branch information
sriramveeraghanta authored Aug 28, 2023
1 parent a9ff4b8 commit 9f420a0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions apps/app/components/project/sidebar-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { useMobxStore } from "lib/mobx/store-provider";
export const ProjectSidebarList: FC = () => {
const store: any = useMobxStore();

const [isFavoriteProjectCreate, setIsFavoriteProjectCreate] = useState(false);
const [isProjectModalOpen, setIsProjectModalOpen] = useState(false);
const [deleteProjectModal, setDeleteProjectModal] = useState(false);
const [projectToDelete, setProjectToDelete] = useState<IProject | null>(null);
Expand Down Expand Up @@ -151,7 +152,7 @@ export const ProjectSidebarList: FC = () => {
<CreateProjectModal
isOpen={isProjectModalOpen}
setIsOpen={setIsProjectModalOpen}
setToFavorite
setToFavorite={isFavoriteProjectCreate}
user={user}
/>
<DeleteProjectModal
Expand Down Expand Up @@ -189,7 +190,10 @@ export const ProjectSidebarList: FC = () => {
</Disclosure.Button>
<button
className="group-hover:opacity-100 opacity-0"
onClick={() => setIsProjectModalOpen(true)}
onClick={() => {
setIsFavoriteProjectCreate(true);
setIsProjectModalOpen(true);
}}
>
<Icon iconName="add" />
</button>
Expand Down Expand Up @@ -252,7 +256,10 @@ export const ProjectSidebarList: FC = () => {
</Disclosure.Button>
<button
className="group-hover:opacity-100 opacity-0"
onClick={() => setIsProjectModalOpen(true)}
onClick={() => {
setIsFavoriteProjectCreate(false);
setIsProjectModalOpen(true);
}}
>
<Icon iconName="add" />
</button>
Expand Down

1 comment on commit 9f420a0

@vercel
Copy link

@vercel vercel bot commented on 9f420a0 Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plane-dev – ./apps/app

plane-dev.vercel.app
plane-dev-plane.vercel.app
plane-dev-git-develop-plane.vercel.app

Please sign in to comment.