forked from github/plane
chore: removed demo m-store routes
This commit is contained in:
parent
3bf590b67e
commit
5af753f475
@ -1,36 +0,0 @@
|
||||
import React from "react";
|
||||
// next imports
|
||||
import { useRouter } from "next/router";
|
||||
// components
|
||||
import { IssuesRoot } from "components/issue-layouts/root";
|
||||
// mobx store
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
import { RootStore } from "store/root";
|
||||
|
||||
const KanBanViewRoot = () => {
|
||||
const router = useRouter();
|
||||
const { workspace_slug, project_slug, cycle_slug } = router.query as {
|
||||
workspace_slug: string;
|
||||
project_slug: string;
|
||||
cycle_slug: string;
|
||||
};
|
||||
|
||||
const store: RootStore = useMobxStore();
|
||||
const { issueView: issueViewStore } = store;
|
||||
|
||||
React.useEffect(() => {
|
||||
console.log("request init--->");
|
||||
const init = async () =>
|
||||
await issueViewStore.getIssuesForCyclesAsync(workspace_slug, project_slug, cycle_slug);
|
||||
if (workspace_slug && project_slug && cycle_slug) init();
|
||||
console.log("request completed--->");
|
||||
}, [workspace_slug, project_slug, cycle_slug, issueViewStore]);
|
||||
|
||||
return (
|
||||
<div className="w-screen min-h-[600px] h-screen">
|
||||
<IssuesRoot />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default KanBanViewRoot;
|
@ -1,55 +0,0 @@
|
||||
import React from "react";
|
||||
// next imports
|
||||
import { useRouter } from "next/router";
|
||||
// components
|
||||
import { IssuesRoot } from "components/issue-layouts/root";
|
||||
// mobx store
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
import { RootStore } from "store/root";
|
||||
import useSWR from "swr";
|
||||
|
||||
const KanBanViewRoot = () => {
|
||||
const router = useRouter();
|
||||
const { workspace_slug, project_slug } = router.query as {
|
||||
workspace_slug: string;
|
||||
project_slug: string;
|
||||
};
|
||||
|
||||
const {
|
||||
issue: issueViewStore,
|
||||
workspace: workspaceStore,
|
||||
project: projectStore,
|
||||
issueFilter: issueFilterStore,
|
||||
}: RootStore = useMobxStore();
|
||||
|
||||
useSWR(
|
||||
workspace_slug && project_slug ? "USER_FILTERS" : null,
|
||||
workspace_slug && project_slug
|
||||
? () => {
|
||||
console.log("sdad");
|
||||
issueFilterStore.fetchUserFilters(workspace_slug.toString(), project_slug.toString());
|
||||
}
|
||||
: null
|
||||
);
|
||||
|
||||
React.useEffect(() => {
|
||||
console.log("request init--->");
|
||||
const init = async () => {
|
||||
// workspaceStore.setWorkspaceId(workspace_slug);
|
||||
// await workspaceStore.getWorkspaces();
|
||||
// await workspaceStore.getWorkspaceLabels(workspace_slug);
|
||||
// projectStore.setProject(project_slug);
|
||||
// await projectStore.getWorkspaceProjects(workspace_slug);
|
||||
// await projectStore.getProjectStates(workspace_slug, project_slug);
|
||||
// await projectStore.getProjectLabels(workspace_slug, project_slug);
|
||||
// await projectStore.getProjectMembers(workspace_slug, project_slug);
|
||||
// await issueViewStore.getProjectIssuesAsync(workspace_slug, project_slug);
|
||||
};
|
||||
if (workspace_slug && project_slug) init();
|
||||
console.log("request completed--->");
|
||||
}, [workspace_slug, project_slug, issueViewStore, workspaceStore, projectStore]);
|
||||
|
||||
return <div className="w-screen min-h-[600px] h-screen">{/* <IssuesRoot /> */}</div>;
|
||||
};
|
||||
|
||||
export default KanBanViewRoot;
|
@ -1,36 +0,0 @@
|
||||
import React from "react";
|
||||
// next imports
|
||||
import { useRouter } from "next/router";
|
||||
// components
|
||||
import { IssuesRoot } from "components/issue-layouts/root";
|
||||
// mobx store
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
import { RootStore } from "store/root";
|
||||
|
||||
const KanBanViewRoot = () => {
|
||||
const router = useRouter();
|
||||
const { workspace_slug, project_slug, module_slug } = router.query as {
|
||||
workspace_slug: string;
|
||||
project_slug: string;
|
||||
module_slug: string;
|
||||
};
|
||||
|
||||
const store: RootStore = useMobxStore();
|
||||
const { issueView: issueViewStore } = store;
|
||||
|
||||
React.useEffect(() => {
|
||||
console.log("request init--->");
|
||||
const init = async () =>
|
||||
await issueViewStore.getIssuesForModulesAsync(workspace_slug, project_slug, module_slug);
|
||||
if (workspace_slug && project_slug && module_slug) init();
|
||||
console.log("request completed--->");
|
||||
}, [workspace_slug, project_slug, module_slug, issueViewStore]);
|
||||
|
||||
return (
|
||||
<div className="w-screen min-h-[600px] h-screen">
|
||||
<IssuesRoot />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default KanBanViewRoot;
|
@ -1,36 +0,0 @@
|
||||
import React from "react";
|
||||
// next imports
|
||||
import { useRouter } from "next/router";
|
||||
// components
|
||||
import { IssuesRoot } from "components/issue-layouts/root";
|
||||
// mobx store
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
import { RootStore } from "store/root";
|
||||
|
||||
const KanBanViewRoot = () => {
|
||||
const router = useRouter();
|
||||
const { workspace_slug, project_slug, view_slug } = router.query as {
|
||||
workspace_slug: string;
|
||||
project_slug: string;
|
||||
view_slug: string;
|
||||
};
|
||||
|
||||
const store: RootStore = useMobxStore();
|
||||
const { issueView: issueViewStore } = store;
|
||||
|
||||
React.useEffect(() => {
|
||||
console.log("request init--->");
|
||||
const init = async () =>
|
||||
await issueViewStore.getIssuesForViewsAsync(workspace_slug, project_slug, view_slug);
|
||||
if (workspace_slug && project_slug && view_slug) init();
|
||||
console.log("request completed--->");
|
||||
}, [workspace_slug, project_slug, view_slug, issueViewStore]);
|
||||
|
||||
return (
|
||||
<div className="w-screen min-h-[600px] h-screen">
|
||||
<IssuesRoot />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default KanBanViewRoot;
|
@ -1,37 +0,0 @@
|
||||
import React from "react";
|
||||
// next imports
|
||||
import { useRouter } from "next/router";
|
||||
// swr
|
||||
// import useSWR from "swr";
|
||||
// components
|
||||
import { IssuesRoot } from "components/issue-layouts/root";
|
||||
// mobx store
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
import { RootStore } from "store/root";
|
||||
|
||||
const KanBanViewRoot = () => {
|
||||
const router = useRouter();
|
||||
const { workspace_slug } = router.query as { workspace_slug: string };
|
||||
|
||||
const store: RootStore = useMobxStore();
|
||||
const { issueView: issueViewStore } = store;
|
||||
|
||||
// useSWR(`REVALIDATE_MY_ISSUES`, async () => {
|
||||
// if (workspace_slug) await issueViewStore.getMyIssuesAsync(workspace_slug);
|
||||
// });
|
||||
|
||||
React.useEffect(() => {
|
||||
console.log("request init--->");
|
||||
const init = async () => await issueViewStore.getMyIssuesAsync(workspace_slug);
|
||||
if (workspace_slug) init();
|
||||
console.log("request completed--->");
|
||||
}, [workspace_slug, issueViewStore]);
|
||||
|
||||
return (
|
||||
<div className="w-screen min-h-[600px] h-screen">
|
||||
<IssuesRoot />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default KanBanViewRoot;
|
Loading…
Reference in New Issue
Block a user