diff --git a/website/src/components/Layout.tsx b/website/src/components/Layout.tsx index 5f6f66b4..3564d765 100644 --- a/website/src/components/Layout.tsx +++ b/website/src/components/Layout.tsx @@ -17,4 +17,12 @@ export const getDefaultLayout = (page: React.ReactElement) => ( ); +export const getTransparentHeaderLayout = (page: React.ReactElement) => ( +
+
+ {page} +
+); + export const noLayout = (page: React.ReactElement) => page; diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index 8c2c34b5..20a4068c 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -5,6 +5,7 @@ import { Faq } from "src/components/Faq"; import { Footer } from "src/components/Footer"; import { Header } from "src/components/Header"; import { Hero } from "src/components/Hero"; +import { getTransparentHeaderLayout } from "src/components/Layout"; import { TaskSelection } from "src/components/TaskSelection"; const Home = () => { @@ -34,12 +35,6 @@ const Home = () => { ); }; -Home.getLayout = (page) => ( -
-
- {page} -
-); +Home.getLayout = getTransparentHeaderLayout; export default Home; diff --git a/website/src/pages/privacy-policy.tsx b/website/src/pages/privacy-policy.tsx index 42f439fc..dcb3bc19 100644 --- a/website/src/pages/privacy-policy.tsx +++ b/website/src/pages/privacy-policy.tsx @@ -2,6 +2,7 @@ import { Container, Heading } from "@chakra-ui/react"; import Head from "next/head"; import { Footer } from "src/components/Footer"; import { Header } from "src/components/Header"; +import { getTransparentHeaderLayout } from "src/components/Layout"; const PrivacyPolicy = () => { return ( @@ -403,12 +404,6 @@ const PrivacyPolicy = () => { ); }; -PrivacyPolicy.getLayout = (page) => ( -
-
- {page} -
-); +PrivacyPolicy.getLayout = getTransparentHeaderLayout; export default PrivacyPolicy; diff --git a/website/src/pages/terms-of-service.tsx b/website/src/pages/terms-of-service.tsx index b2d668a5..d97c8d34 100644 --- a/website/src/pages/terms-of-service.tsx +++ b/website/src/pages/terms-of-service.tsx @@ -2,6 +2,7 @@ import { Container, Heading } from "@chakra-ui/react"; import Head from "next/head"; import { Footer } from "src/components/Footer"; import { Header } from "src/components/Header"; +import { getTransparentHeaderLayout } from "src/components/Layout"; const TermsOfService = () => { return ( @@ -148,12 +149,6 @@ const TermsOfService = () => { ); }; -TermsOfService.getLayout = (page) => ( -
-
- {page} -
-); +TermsOfService.getLayout = getTransparentHeaderLayout; export default TermsOfService;