diff --git a/apps/govern/components/Meta.tsx b/apps/govern/components/Meta.tsx new file mode 100644 index 00000000..cfab4751 --- /dev/null +++ b/apps/govern/components/Meta.tsx @@ -0,0 +1,63 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import Head from 'next/head'; + +const SITE_URL = 'https://govern.olas.network'; +const SITE_TITLE = 'Olas Govern'; +const SITE_DESCRIPTION = + 'View various contracts and join the decision-making process that drives growth in the Olas ecosystem; direct the future of Olas.'; + +const Meta = ({ + pageTitle, + description, + pageUrl, +}: { + pageTitle: string; + description: string; + pageUrl: string; +}) => { + const title = pageTitle ? `${pageTitle} | ${SITE_TITLE}` : SITE_TITLE; + const url = `${SITE_URL}/${pageUrl}`; + + return ( + + {/* */} + {title} + + + + {/* */} + + + + + + {/* */} + + + + + + ); +}; + +Meta.propTypes = { + pageTitle: PropTypes.string, + description: PropTypes.string, + pageUrl: PropTypes.string, +}; +Meta.defaultProps = { + pageTitle: null, + description: SITE_DESCRIPTION, + pageUrl: '', +}; + +export default Meta; diff --git a/apps/govern/components/VeOlas/index.tsx b/apps/govern/components/VeOlas/index.tsx index 0445c29c..815de78a 100644 --- a/apps/govern/components/VeOlas/index.tsx +++ b/apps/govern/components/VeOlas/index.tsx @@ -22,7 +22,7 @@ const Title = styled.h1` margin: 0 0 8px; `; -export const VeOlasPage = () => { +export const VeOlas = () => { const { isLoading, canWithdrawVeolas, canIncreaseAmountOrUnlock } = useFetchBalances(); const [isCreateLockModalVisible, setIsCreateLockModalVisible] = useState(false); diff --git a/apps/govern/pages/_app.tsx b/apps/govern/pages/_app.tsx index f34f0bc4..914a08d0 100644 --- a/apps/govern/pages/_app.tsx +++ b/apps/govern/pages/_app.tsx @@ -1,5 +1,4 @@ import type { AppProps } from 'next/app'; -import Head from 'next/head'; import { FC, PropsWithChildren } from 'react'; import { Provider } from 'react-redux'; @@ -11,6 +10,7 @@ import { Web3ModalProvider } from 'context/Web3ModalProvider'; import { Layout } from '../components/Layout'; import { useFetchStakingContractsList, useFetchUserVotes } from '../hooks'; import { wrapper } from '../store'; +import Meta from 'components/Meta'; const DataProvider: FC = ({ children }) => { useFetchStakingContractsList(); @@ -25,9 +25,7 @@ const GovernApp = ({ Component, ...rest }: AppProps) => { return ( <> - - Govern - + diff --git a/apps/govern/pages/veolas.tsx b/apps/govern/pages/veolas.tsx index 08219922..7a1e9245 100644 --- a/apps/govern/pages/veolas.tsx +++ b/apps/govern/pages/veolas.tsx @@ -1,3 +1,15 @@ -import { VeOlasPage } from '../components/VeOlas'; +import Meta from 'components/Meta'; +import { VeOlas } from '../components/VeOlas'; + +const VeOlasPage = () => ( + <> + + + +); export default VeOlasPage;