chore: applying query params to the global issues filters in the global views (#3464)

* chore: applying filters from the route params to the global issue filters store and Typos

* chore: enabled posthog

* fix: labels disbaled and loader while creating the label in isse detail and relation modal loader and mutation issue
This commit is contained in:
guru_sainath 2024-01-25 14:27:35 +05:30 committed by GitHub
parent 336c97d336
commit ec3cad1f25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 70 additions and 22 deletions

View file

@ -0,0 +1,28 @@
import useSWR from "swr";
import { useEstimate, useLabel, useProjectState } from "./store";
export const useWorkspaceIssueProperties = (workspaceSlug: string | string[] | undefined) => {
const { fetchWorkspaceLabels } = useLabel();
const { fetchWorkspaceStates } = useProjectState();
const { fetchWorkspaceEstimates } = useEstimate();
// fetch workspace labels
useSWR(
workspaceSlug ? `WORKSPACE_LABELS_${workspaceSlug}` : null,
workspaceSlug ? () => fetchWorkspaceLabels(workspaceSlug.toString()) : null
);
// fetch workspace states
useSWR(
workspaceSlug ? `WORKSPACE_STATES_${workspaceSlug}` : null,
workspaceSlug ? () => fetchWorkspaceStates(workspaceSlug.toString()) : null
);
// fetch workspace estimates
useSWR(
workspaceSlug ? `WORKSPACE_ESTIMATES_${workspaceSlug}` : null,
workspaceSlug ? () => fetchWorkspaceEstimates(workspaceSlug.toString()) : null
);
};