mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: loading state improvement (#3657)
This commit is contained in:
parent
25a2816a76
commit
83bf28bb83
@ -17,8 +17,6 @@ import {
|
|||||||
} from "components/issues";
|
} from "components/issues";
|
||||||
import { TransferIssues, TransferIssuesModal } from "components/cycles";
|
import { TransferIssues, TransferIssuesModal } from "components/cycles";
|
||||||
import { ActiveLoader } from "components/ui";
|
import { ActiveLoader } from "components/ui";
|
||||||
// ui
|
|
||||||
import { Spinner } from "@plane/ui";
|
|
||||||
// constants
|
// constants
|
||||||
import { EIssuesStoreType } from "constants/issue";
|
import { EIssuesStoreType } from "constants/issue";
|
||||||
|
|
||||||
@ -56,17 +54,7 @@ export const CycleLayoutRoot: React.FC = observer(() => {
|
|||||||
if (!workspaceSlug || !projectId || !cycleId) return <></>;
|
if (!workspaceSlug || !projectId || !cycleId) return <></>;
|
||||||
|
|
||||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||||
return (
|
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||||
<>
|
|
||||||
{activeLayout ? (
|
|
||||||
<ActiveLoader layout={activeLayout} />
|
|
||||||
) : (
|
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
|
||||||
<Spinner />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -11,7 +11,6 @@ import { ProjectDraftEmptyState } from "../empty-states";
|
|||||||
import { IssuePeekOverview } from "components/issues/peek-overview";
|
import { IssuePeekOverview } from "components/issues/peek-overview";
|
||||||
import { ActiveLoader } from "components/ui";
|
import { ActiveLoader } from "components/ui";
|
||||||
// ui
|
// ui
|
||||||
import { Spinner } from "@plane/ui";
|
|
||||||
import { DraftKanBanLayout } from "../kanban/roots/draft-issue-root";
|
import { DraftKanBanLayout } from "../kanban/roots/draft-issue-root";
|
||||||
// constants
|
// constants
|
||||||
import { EIssuesStoreType } from "constants/issue";
|
import { EIssuesStoreType } from "constants/issue";
|
||||||
@ -42,17 +41,7 @@ export const DraftIssueLayoutRoot: React.FC = observer(() => {
|
|||||||
if (!workspaceSlug || !projectId) return <></>;
|
if (!workspaceSlug || !projectId) return <></>;
|
||||||
|
|
||||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||||
return (
|
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||||
<>
|
|
||||||
{activeLayout ? (
|
|
||||||
<ActiveLoader layout={activeLayout} />
|
|
||||||
) : (
|
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
|
||||||
<Spinner />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -16,8 +16,6 @@ import {
|
|||||||
ModuleSpreadsheetLayout,
|
ModuleSpreadsheetLayout,
|
||||||
} from "components/issues";
|
} from "components/issues";
|
||||||
import { ActiveLoader } from "components/ui";
|
import { ActiveLoader } from "components/ui";
|
||||||
// ui
|
|
||||||
import { Spinner } from "@plane/ui";
|
|
||||||
// constants
|
// constants
|
||||||
import { EIssuesStoreType } from "constants/issue";
|
import { EIssuesStoreType } from "constants/issue";
|
||||||
|
|
||||||
@ -50,17 +48,7 @@ export const ModuleLayoutRoot: React.FC = observer(() => {
|
|||||||
const activeLayout = issuesFilter?.issueFilters?.displayFilters?.layout || undefined;
|
const activeLayout = issuesFilter?.issueFilters?.displayFilters?.layout || undefined;
|
||||||
|
|
||||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||||
return (
|
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||||
<>
|
|
||||||
{activeLayout ? (
|
|
||||||
<ActiveLoader layout={activeLayout} />
|
|
||||||
) : (
|
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
|
||||||
<Spinner />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -15,7 +15,6 @@ import {
|
|||||||
ProjectViewListLayout,
|
ProjectViewListLayout,
|
||||||
ProjectViewSpreadsheetLayout,
|
ProjectViewSpreadsheetLayout,
|
||||||
} from "components/issues";
|
} from "components/issues";
|
||||||
import { Spinner } from "@plane/ui";
|
|
||||||
import { ActiveLoader } from "components/ui";
|
import { ActiveLoader } from "components/ui";
|
||||||
// constants
|
// constants
|
||||||
import { EIssuesStoreType } from "constants/issue";
|
import { EIssuesStoreType } from "constants/issue";
|
||||||
@ -66,17 +65,7 @@ export const ProjectViewLayoutRoot: React.FC = observer(() => {
|
|||||||
if (!workspaceSlug || !projectId || !viewId) return <></>;
|
if (!workspaceSlug || !projectId || !viewId) return <></>;
|
||||||
|
|
||||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||||
return (
|
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||||
<>
|
|
||||||
{activeLayout ? (
|
|
||||||
<ActiveLoader layout={activeLayout} />
|
|
||||||
) : (
|
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
|
||||||
<Spinner />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user