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";
|
||||
import { TransferIssues, TransferIssuesModal } from "components/cycles";
|
||||
import { ActiveLoader } from "components/ui";
|
||||
// ui
|
||||
import { Spinner } from "@plane/ui";
|
||||
// constants
|
||||
import { EIssuesStoreType } from "constants/issue";
|
||||
|
||||
@ -56,17 +54,7 @@ export const CycleLayoutRoot: React.FC = observer(() => {
|
||||
if (!workspaceSlug || !projectId || !cycleId) return <></>;
|
||||
|
||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||
return (
|
||||
<>
|
||||
{activeLayout ? (
|
||||
<ActiveLoader layout={activeLayout} />
|
||||
) : (
|
||||
<div className="flex h-full w-full items-center justify-center">
|
||||
<Spinner />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -11,7 +11,6 @@ import { ProjectDraftEmptyState } from "../empty-states";
|
||||
import { IssuePeekOverview } from "components/issues/peek-overview";
|
||||
import { ActiveLoader } from "components/ui";
|
||||
// ui
|
||||
import { Spinner } from "@plane/ui";
|
||||
import { DraftKanBanLayout } from "../kanban/roots/draft-issue-root";
|
||||
// constants
|
||||
import { EIssuesStoreType } from "constants/issue";
|
||||
@ -42,17 +41,7 @@ export const DraftIssueLayoutRoot: React.FC = observer(() => {
|
||||
if (!workspaceSlug || !projectId) return <></>;
|
||||
|
||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||
return (
|
||||
<>
|
||||
{activeLayout ? (
|
||||
<ActiveLoader layout={activeLayout} />
|
||||
) : (
|
||||
<div className="flex h-full w-full items-center justify-center">
|
||||
<Spinner />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -16,8 +16,6 @@ import {
|
||||
ModuleSpreadsheetLayout,
|
||||
} from "components/issues";
|
||||
import { ActiveLoader } from "components/ui";
|
||||
// ui
|
||||
import { Spinner } from "@plane/ui";
|
||||
// constants
|
||||
import { EIssuesStoreType } from "constants/issue";
|
||||
|
||||
@ -50,17 +48,7 @@ export const ModuleLayoutRoot: React.FC = observer(() => {
|
||||
const activeLayout = issuesFilter?.issueFilters?.displayFilters?.layout || undefined;
|
||||
|
||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||
return (
|
||||
<>
|
||||
{activeLayout ? (
|
||||
<ActiveLoader layout={activeLayout} />
|
||||
) : (
|
||||
<div className="flex h-full w-full items-center justify-center">
|
||||
<Spinner />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -15,7 +15,6 @@ import {
|
||||
ProjectViewListLayout,
|
||||
ProjectViewSpreadsheetLayout,
|
||||
} from "components/issues";
|
||||
import { Spinner } from "@plane/ui";
|
||||
import { ActiveLoader } from "components/ui";
|
||||
// constants
|
||||
import { EIssuesStoreType } from "constants/issue";
|
||||
@ -66,17 +65,7 @@ export const ProjectViewLayoutRoot: React.FC = observer(() => {
|
||||
if (!workspaceSlug || !projectId || !viewId) return <></>;
|
||||
|
||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||
return (
|
||||
<>
|
||||
{activeLayout ? (
|
||||
<ActiveLoader layout={activeLayout} />
|
||||
) : (
|
||||
<div className="flex h-full w-full items-center justify-center">
|
||||
<Spinner />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user