Skip to content

Commit 70a31df

Browse files
authored
Merge pull request #30 from uc-cdis/fix/exclude-external-footer-from-layout
exclude external footer from layout
2 parents 2f14215 + 23371fa commit 70a31df

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
lines changed

src/lib/Layouts.tsx

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import React from 'react';
2+
import HealHeader from './HealNav/HealHeader';
3+
import HealFooter from './HealNav/HealFooter';
4+
5+
export default function Layout({
6+
children,
7+
}: {
8+
children: React.ReactNode
9+
}) {
10+
return (
11+
<>
12+
<HealHeader />
13+
{children}
14+
<HealFooter />
15+
</>
16+
);
17+
}

src/pages/_document.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import Document, {
22
DocumentContext,
33
DocumentInitialProps,
4-
Html,
54
Head,
5+
Html,
66
Main,
77
NextScript,
88
} from 'next/document';
99
import { ColorSchemeScript } from '@mantine/core';
10-
import HealHeader from '@/lib/HealNav/HealHeader';
11-
import HealFooter from '@/lib/HealNav/HealFooter';
1210

1311
class Gen3Document extends Document {
1412
static async getInitialProps(
@@ -31,12 +29,10 @@ class Gen3Document extends Document {
3129
<Html lang="en">
3230
<Head />
3331
<body className="flex flex-col min-h-screen">
34-
<HealHeader />
3532
<main id="main-content" className="flex-grow">
3633
<Main />
3734
<NextScript />
3835
</main>
39-
<HealFooter />
4036
</body>
4137
</Html>
4238
);

src/pages/index.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1+
import Layout from '@/lib/Layouts';
12
import HealLandingPage from './Home';
2-
export default HealLandingPage;
3+
4+
export default function IndexPage() {
5+
return (
6+
<Layout>
7+
<HealLandingPage />
8+
</Layout>
9+
);
10+
}

src/pages/newly-available-datasets.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ import React from 'react';
22
import CardedPageContent from '@/lib/NewlyAvailableDatasets/CardedPageContent';
33
import newDatasetsPageConfig from '../../config/heal/newDatasets.json';
44
import PageTitle from '@/lib/HealNav/PageTitle';
5+
import Layout from '@/lib/Layouts';
56

67
const NewlyAvailableDatasetsPage = () => {
78
return (
8-
<>
9+
<Layout>
910
<PageTitle pageName="Newly Available Datasets" />
1011
<div className="flex flex-row justify-items-center">
1112
<div className="sm:prose-base lg:prose-lg xl:prose-xl 2xl:prose-xl mx-20">
1213
<CardedPageContent {...newDatasetsPageConfig} />
1314
</div>
1415
</div>
15-
</>
16+
</Layout>
1617
);
1718
};
1819

0 commit comments

Comments
 (0)