[WEB-937] fix: inbox issue hook render issue and code refactor (#4168)

* fix: inbox issue hook render issue and code refactor

* fix: inbox issue hook render issue and code refactor
This commit is contained in:
Anmol Singh Bhatia 2024-04-10 21:28:48 +05:30 committed by GitHub
parent 5c6170507e
commit 5250c64be5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,8 +25,6 @@ const ProjectInboxPage: NextPageWithLayout = observer(() => {
const { currentProjectDetails } = useProject(); const { currentProjectDetails } = useProject();
const { currentTab, handleCurrentTab } = useProjectInbox(); const { currentTab, handleCurrentTab } = useProjectInbox();
if (!workspaceSlug || !projectId) return <></>;
// No access to inbox // No access to inbox
if (currentProjectDetails?.inbox_view === false) if (currentProjectDetails?.inbox_view === false)
return ( return (
@ -46,6 +44,8 @@ const ProjectInboxPage: NextPageWithLayout = observer(() => {
handleCurrentTab(navigationTab === "open" ? EInboxIssueCurrentTab.OPEN : EInboxIssueCurrentTab.CLOSED); handleCurrentTab(navigationTab === "open" ? EInboxIssueCurrentTab.OPEN : EInboxIssueCurrentTab.CLOSED);
}, [currentTab, navigationTab, handleCurrentTab]); }, [currentTab, navigationTab, handleCurrentTab]);
if (!workspaceSlug || !projectId) return <></>;
return ( return (
<div className="flex h-full flex-col"> <div className="flex h-full flex-col">
<PageHead title={pageTitle} /> <PageHead title={pageTitle} />