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,4 +1,4 @@
|
|||
import React from "react";
|
||||
import { ReactElement } from "react";
|
||||
// layouts
|
||||
import { AppLayout } from "layouts/app-layout";
|
||||
import { ProjectSettingLayout } from "layouts/settings-layout";
|
||||
|
|
@ -6,16 +6,20 @@ import { ProjectSettingLayout } from "layouts/settings-layout";
|
|||
import { ProjectSettingHeader } from "components/headers";
|
||||
import { EstimatesList } from "components/estimates/estimate-list";
|
||||
// types
|
||||
import type { NextPage } from "next";
|
||||
import { NextPageWithLayout } from "types/app";
|
||||
|
||||
const EstimatesSettings: NextPage = () => (
|
||||
<AppLayout header={<ProjectSettingHeader title="Estimates Settings" />} withProjectWrapper>
|
||||
<ProjectSettingLayout>
|
||||
<div className="pr-9 py-8 w-full overflow-y-auto">
|
||||
<EstimatesList />
|
||||
</div>
|
||||
</ProjectSettingLayout>
|
||||
</AppLayout>
|
||||
const EstimatesSettingsPage: NextPageWithLayout = () => (
|
||||
<div className="pr-9 py-8 w-full overflow-y-auto">
|
||||
<EstimatesList />
|
||||
</div>
|
||||
);
|
||||
|
||||
export default EstimatesSettings;
|
||||
EstimatesSettingsPage.getLayout = function getLayout(page: ReactElement) {
|
||||
return (
|
||||
<AppLayout header={<ProjectSettingHeader title="Estimates Settings" />} withProjectWrapper>
|
||||
<ProjectSettingLayout>{page}; </ProjectSettingLayout>
|
||||
</AppLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default EstimatesSettingsPage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue