mirror of
https://github.com/makeplane/plane.git
synced 2026-02-24 04:00:14 +01:00
fix: issues widget loading state
This commit is contained in:
@@ -91,7 +91,7 @@ export const PageEditorBody: React.FC<Props> = observer((props) => {
|
||||
updateMarkings(description_html ?? "<p></p>");
|
||||
}, [description_html, updateMarkings]);
|
||||
|
||||
if (!issues && issuesLoading)
|
||||
if (!issues || issuesLoading)
|
||||
return (
|
||||
<div className="h-full w-full grid place-items-center">
|
||||
<Spinner />
|
||||
|
||||
@@ -19,7 +19,11 @@ export const useIssueEmbeds = () => {
|
||||
|
||||
const { data: issuesResponse, isLoading: issuesLoading } = useSWR(
|
||||
workspaceSlug && projectId ? PROJECT_ISSUES_LIST(workspaceSlug as string, projectId as string) : null,
|
||||
workspaceSlug && projectId ? () => issueService.getIssues(workspaceSlug as string, projectId as string) : null
|
||||
workspaceSlug && projectId ? () => issueService.getIssues(workspaceSlug as string, projectId as string) : null,
|
||||
{
|
||||
revalidateOnFocus: false,
|
||||
revalidateIfStale: false,
|
||||
}
|
||||
);
|
||||
|
||||
const issues = Object.values(issuesResponse ?? {});
|
||||
|
||||
Reference in New Issue
Block a user