fix: implementing layouts using _app.tsx get layout method. (#2620)
* fix: implementing layouts in all pages * fix: layout fixes, implemting using standard nextjs parctice
This commit is contained in:
parent
a582021f2c
commit
3c884fd46e
57 changed files with 1653 additions and 1423 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import { ReactElement } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
import { NextPage } from "next";
|
||||
import useSWR from "swr";
|
||||
// hooks
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
|
|
@ -9,8 +8,10 @@ import { AppLayout } from "layouts/app-layout";
|
|||
// components
|
||||
import { InboxActionsHeader, InboxMainContent, InboxIssuesListSidebar } from "components/inbox";
|
||||
import { ProjectInboxHeader } from "components/headers";
|
||||
// types
|
||||
import { NextPageWithLayout } from "types/app";
|
||||
|
||||
const ProjectInbox: NextPage = () => {
|
||||
const ProjectInboxPage: NextPageWithLayout = () => {
|
||||
const router = useRouter();
|
||||
const { workspaceSlug, projectId, inboxId } = router.query;
|
||||
|
||||
|
|
@ -24,18 +25,24 @@ const ProjectInbox: NextPage = () => {
|
|||
);
|
||||
|
||||
return (
|
||||
<AppLayout header={<ProjectInboxHeader />} withProjectWrapper>
|
||||
<div className="flex flex-col h-full">
|
||||
<InboxActionsHeader />
|
||||
<div className="grid grid-cols-4 flex-1 divide-x divide-custom-border-200 overflow-hidden">
|
||||
<InboxIssuesListSidebar />
|
||||
<div className="col-span-3 h-full overflow-auto">
|
||||
<InboxMainContent />
|
||||
</div>
|
||||
<div className="flex flex-col h-full">
|
||||
<InboxActionsHeader />
|
||||
<div className="grid grid-cols-4 flex-1 divide-x divide-custom-border-200 overflow-hidden">
|
||||
<InboxIssuesListSidebar />
|
||||
<div className="col-span-3 h-full overflow-auto">
|
||||
<InboxMainContent />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
ProjectInboxPage.getLayout = function getLayout(page: ReactElement) {
|
||||
return (
|
||||
<AppLayout header={<ProjectInboxHeader />} withProjectWrapper>
|
||||
{page}
|
||||
</AppLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default ProjectInbox;
|
||||
export default ProjectInboxPage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue