refactor: cycles store (#2716)

* refactor: cycles store

* refactor: active cycle details
This commit is contained in:
Aaryan Khandelwal 2023-11-09 18:37:45 +05:30 committed by GitHub
parent 162faf8339
commit 884b219508
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 200 additions and 285 deletions

View file

@ -87,7 +87,7 @@ export const CyclesListItem: FC<TCyclesListItem> = (props) => {
e.preventDefault();
if (!workspaceSlug || !projectId) return;
cycleStore.addCycleToFavorites(workspaceSlug?.toString(), projectId.toString(), cycle.id).catch(() => {
cycleStore.addCycleToFavorites(workspaceSlug?.toString(), projectId.toString(), cycle).catch(() => {
setToastAlert({
type: "error",
title: "Error!",
@ -100,7 +100,7 @@ export const CyclesListItem: FC<TCyclesListItem> = (props) => {
e.preventDefault();
if (!workspaceSlug || !projectId) return;
cycleStore.removeCycleFromFavorites(workspaceSlug?.toString(), projectId.toString(), cycle.id).catch(() => {
cycleStore.removeCycleFromFavorites(workspaceSlug?.toString(), projectId.toString(), cycle).catch(() => {
setToastAlert({
type: "error",
title: "Error!",