chore: inbox layout loader and peek overview subscription improvement (#3803)

This commit is contained in:
Anmol Singh Bhatia 2024-02-26 19:44:01 +05:30 committed by GitHub
parent 01e09873e6
commit 1866474569
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -67,7 +67,7 @@ export const IssueSubscription: FC<TIssueSubscription> = observer((props) => {
>
{loading ? (
<span>
<span className="hidden sm:block">Loading</span>...
<span className="hidden sm:block">Loading...</span>
</span>
) : isSubscribed ? (
<div className="hidden sm:block">Unsubscribe</div>

View File

@ -7,6 +7,7 @@ import { useProject, useInboxIssues } from "hooks/store";
// layouts
import { AppLayout } from "layouts/app-layout";
// components
import { InboxLayoutLoader } from "components/ui";
import { PageHead } from "components/core";
import { ProjectInboxHeader } from "components/headers";
import { InboxSidebarRoot, InboxContentRoot } from "components/inbox";
@ -23,7 +24,7 @@ const ProjectInboxPage: NextPageWithLayout = observer(() => {
issues: { fetchInboxIssues },
} = useInboxIssues();
// fetching the Inbox filters and issues
useSWR(
const { isLoading } = useSWR(
workspaceSlug && projectId && currentProjectDetails && currentProjectDetails?.inbox_view
? `INBOX_ISSUES_${workspaceSlug.toString()}_${projectId.toString()}`
: null,
@ -37,7 +38,12 @@ const ProjectInboxPage: NextPageWithLayout = observer(() => {
// derived values
const pageTitle = currentProjectDetails?.name ? `${currentProjectDetails?.name} - Inbox` : undefined;
if (!workspaceSlug || !projectId || !inboxId || !currentProjectDetails?.inbox_view) return <></>;
if (!workspaceSlug || !projectId || !inboxId || !currentProjectDetails?.inbox_view || isLoading)
return (
<div className="flex h-full flex-col">
<InboxLayoutLoader />
</div>
);
return (
<>