const stateGroup = issueGroupFilter(state.group);
const removeStateFromFilter = () => {
- router.replace(
- store.issue.getURLDefinition(workspace_slug, project_slug, {
- key: "state",
- value: state?.id,
- })
- );
+ // router.replace(
+ // store.issue.getURLDefinition(workspace_slug, project_slug, {
+ // key: "state",
+ // value: state?.id,
+ // })
+ // );
};
if (stateGroup === null) return <>>;
diff --git a/apps/space/components/issues/filters-render/state/index.tsx b/apps/space/components/issues/filters-render/state/index.tsx
index 8c678e58f..0198c5215 100644
--- a/apps/space/components/issues/filters-render/state/index.tsx
+++ b/apps/space/components/issues/filters-render/state/index.tsx
@@ -16,12 +16,12 @@ const IssueStateFilter = observer(() => {
const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
const clearStateFilters = () => {
- router.replace(
- store.issue.getURLDefinition(workspace_slug, project_slug, {
- key: "state",
- removeAll: true,
- })
- );
+ // router.replace(
+ // store.issue.getURLDefinition(workspace_slug, project_slug, {
+ // key: "state",
+ // removeAll: true,
+ // })
+ // );
};
return (
@@ -29,13 +29,13 @@ const IssueStateFilter = observer(() => {
State
- {store?.issue?.states &&
+ {/* {store?.issue?.states &&
store?.issue?.states.map(
(_state: IIssueState, _index: number) =>
store.issue.getUserSelectedFilter("state", _state.id) && (
)
- )}
+ )} */}
void;
diff --git a/apps/space/components/issues/peek-overview/header.tsx b/apps/space/components/issues/peek-overview/header.tsx
index b397f2b5b..12747c287 100644
--- a/apps/space/components/issues/peek-overview/header.tsx
+++ b/apps/space/components/issues/peek-overview/header.tsx
@@ -12,7 +12,7 @@ import { RootStore } from "store/root";
// lib
import { useMobxStore } from "lib/mobx/store-provider";
// types
-import { IIssue } from "types";
+import { IIssue } from "types/issue";
type Props = {
handleClose: () => void;
diff --git a/apps/space/components/issues/peek-overview/issue-activity.tsx b/apps/space/components/issues/peek-overview/issue-activity.tsx
index e12d223f8..0cef85991 100644
--- a/apps/space/components/issues/peek-overview/issue-activity.tsx
+++ b/apps/space/components/issues/peek-overview/issue-activity.tsx
@@ -6,7 +6,7 @@ import { useMobxStore } from "lib/mobx/store-provider";
// components
import { CommentCard, AddComment } from "components/issues/peek-overview";
// types
-import { IIssue } from "types";
+import { IIssue } from "types/issue";
type Props = {
issueDetails: IIssue;
diff --git a/apps/space/components/issues/peek-overview/issue-details.tsx b/apps/space/components/issues/peek-overview/issue-details.tsx
index ebdab3521..22bc14c7e 100644
--- a/apps/space/components/issues/peek-overview/issue-details.tsx
+++ b/apps/space/components/issues/peek-overview/issue-details.tsx
@@ -2,7 +2,7 @@ import { IssueReactions } from "components/issues/peek-overview";
import { TipTapEditor } from "components/tiptap";
import { useRouter } from "next/router";
// types
-import { IIssue } from "types";
+import { IIssue } from "types/issue";
type Props = {
issueDetails: IIssue;
diff --git a/apps/space/components/issues/peek-overview/issue-properties.tsx b/apps/space/components/issues/peek-overview/issue-properties.tsx
index d91defc84..2d454852a 100644
--- a/apps/space/components/issues/peek-overview/issue-properties.tsx
+++ b/apps/space/components/issues/peek-overview/issue-properties.tsx
@@ -7,7 +7,7 @@ import useToast from "hooks/use-toast";
import { Icon } from "components/ui";
import { copyTextToClipboard, addSpaceIfCamelCase } from "helpers/string.helper";
// types
-import { IIssue } from "types";
+import { IIssue } from "types/issue";
// constants
import { issueGroupFilter, issuePriorityFilter } from "constants/data";
import { useEffect } from "react";
diff --git a/apps/space/components/issues/peek-overview/side-peek-view.tsx b/apps/space/components/issues/peek-overview/side-peek-view.tsx
index 067d78c20..bacf83420 100644
--- a/apps/space/components/issues/peek-overview/side-peek-view.tsx
+++ b/apps/space/components/issues/peek-overview/side-peek-view.tsx
@@ -8,7 +8,7 @@ import {
} from "components/issues/peek-overview";
import { Loader } from "components/ui/loader";
-import { IIssue } from "types";
+import { IIssue } from "types/issue";
type Props = {
handleClose: () => void;
diff --git a/apps/space/lib/mobx/store-init.tsx b/apps/space/lib/mobx/store-init.tsx
index 93d2006c0..1412a1015 100644
--- a/apps/space/lib/mobx/store-init.tsx
+++ b/apps/space/lib/mobx/store-init.tsx
@@ -20,11 +20,11 @@ const MobxStoreInit = () => {
else localStorage.setItem("app_theme", _theme && _theme != "light" ? "dark" : "light");
}, [store?.theme]);
- useEffect(() => {
- store.issue.userSelectedLabels = labels || [];
- store.issue.userSelectedPriorities = priorities || [];
- store.issue.userSelectedStates = states || [];
- }, [store.issue]);
+ // useEffect(() => {
+ // store.issue.userSelectedLabels = labels || [];
+ // store.issue.userSelectedPriorities = priorities || [];
+ // store.issue.userSelectedStates = states || [];
+ // }, [store.issue]);
return <>>;
};
diff --git a/apps/space/pages/onboarding/index.tsx b/apps/space/pages/onboarding/index.tsx
index b77639db0..10adb1d18 100644
--- a/apps/space/pages/onboarding/index.tsx
+++ b/apps/space/pages/onboarding/index.tsx
@@ -24,7 +24,7 @@ const OnBoardingPage = () => {
const user = userStore?.currentUser;
if (!user) {
- userStore.getUserAsync();
+ userStore.fetchCurrentUser();
}
}, [userStore]);
diff --git a/apps/space/store/issue_details.ts b/apps/space/store/issue_details.ts
index 7c0f66413..59664033d 100644
--- a/apps/space/store/issue_details.ts
+++ b/apps/space/store/issue_details.ts
@@ -3,7 +3,7 @@ import { makeObservable, observable, action, runInAction } from "mobx";
import { RootStore } from "./root";
// services
import IssueService from "services/issue.service";
-import { IIssue } from "types";
+import { IIssue } from "types/issue";
export type IPeekMode = "side" | "modal" | "full";
diff --git a/apps/space/store/issue_legacy.ts b/apps/space/store/issue_legacy.ts
index 0bff689c6..a2cc2e306 100644
--- a/apps/space/store/issue_legacy.ts
+++ b/apps/space/store/issue_legacy.ts
@@ -3,8 +3,7 @@ import { observable, action, computed, makeObservable, runInAction, reaction } f
// service
import IssueService from "services/issue.service";
// types
-import { IssueDetailType, TIssueBoardKeys } from "types/issue";
-import { IIssue, IIssueState, IIssueLabel } from "../types";
+import { IssueDetailType, TIssueBoardKeys, IIssueLabel, IIssueState, IIssue } from "types/issue";
export interface IIssueStore {
currentIssueBoardView: TIssueBoardKeys | null;
diff --git a/apps/space/store/project.ts b/apps/space/store/project.ts
index 45ce06f72..ddd589f9a 100644
--- a/apps/space/store/project.ts
+++ b/apps/space/store/project.ts
@@ -3,7 +3,7 @@ import { observable, action, makeObservable, runInAction } from "mobx";
// service
import ProjectService from "services/project.service";
// types
-import { IWorkspace, IProject, IProjectSettings } from "../types";
+import { IWorkspace, IProject, IProjectSettings } from "types/project";
export interface IProjectStore {
loader: boolean;
diff --git a/apps/space/store/root.ts b/apps/space/store/root.ts
index cf097a1c6..1d37053ff 100644
--- a/apps/space/store/root.ts
+++ b/apps/space/store/root.ts
@@ -7,7 +7,7 @@ import IssueStore, { IIssueStore } from "./issue";
import ProjectStore, { IProjectStore } from "./project";
import IssueDetailStore, { IIssueDetailStore } from "./issue_details";
// types
-import { IThemeStore } from "../types";
+import { IThemeStore } from "types/theme";
enableStaticRendering(typeof window === "undefined");
diff --git a/apps/space/store/theme.ts b/apps/space/store/theme.ts
index c12297398..1a6b9b2c2 100644
--- a/apps/space/store/theme.ts
+++ b/apps/space/store/theme.ts
@@ -1,7 +1,7 @@
// mobx
import { observable, action, computed, makeObservable, runInAction } from "mobx";
// types
-import { IThemeStore } from "../types";
+import { IThemeStore } from "types/theme";
class ThemeStore implements IThemeStore {
theme: "light" | "dark" = "light";
diff --git a/apps/space/types/index.ts b/apps/space/types/index.ts
deleted file mode 100644
index 5a0a51eda..000000000
--- a/apps/space/types/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * from "./user";
-export * from "./theme";
-export * from "./project";
-export * from "./issue";
diff --git a/apps/space/types/user.ts b/apps/space/types/user.ts
index e69de29bb..45b3f3b6e 100644
--- a/apps/space/types/user.ts
+++ b/apps/space/types/user.ts
@@ -0,0 +1,3 @@
+export interface IUser {
+ first_name: string;
+}