chore: implemented autorun for inbox issues (#2470)

* fix: inbox issues not loading

* chore: implemented autorun for inbox issues

* chore: don't revalidate inbox list
This commit is contained in:
Aaryan Khandelwal 2023-10-18 13:56:19 +05:30 committed by GitHub
parent 3197dd484c
commit baa2621fe2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 50 additions and 20 deletions

View file

@ -19,7 +19,7 @@ const ProjectInbox: NextPage = () => {
const router = useRouter();
const { workspaceSlug, projectId, inboxId } = router.query;
const { inboxIssues: inboxIssuesStore, inboxFilters: inboxFiltersStore, project: projectStore } = useMobxStore();
const { inboxFilters: inboxFiltersStore, project: projectStore } = useMobxStore();
const projectDetails =
workspaceSlug && projectId
@ -27,12 +27,9 @@ const ProjectInbox: NextPage = () => {
: undefined;
useSWR(
workspaceSlug && projectId && inboxId ? `REVALIDATE_INBOX_${inboxId.toString()}` : null,
workspaceSlug && projectId && inboxId ? `INBOX_FILTERS_${inboxId.toString()}` : null,
workspaceSlug && projectId && inboxId
? async () => {
await inboxFiltersStore.fetchInboxFilters(workspaceSlug.toString(), projectId.toString(), inboxId.toString());
await inboxIssuesStore.fetchInboxIssues(workspaceSlug.toString(), projectId.toString(), inboxId.toString());
}
? () => inboxFiltersStore.fetchInboxFilters(workspaceSlug.toString(), projectId.toString(), inboxId.toString())
: null
);