From e555025dbc40b25a32e769870295c7a39a944ba0 Mon Sep 17 00:00:00 2001
From: atepem <57289722+atepem@users.noreply.github.com>
Date: Wed, 13 Nov 2024 23:49:16 +0000
Subject: [PATCH 1/3] chore: added title to Veolas for duplicate title error in
SEMrush
---
apps/govern/components/VeOlas/index.tsx | 109 +++++++++++++-----------
1 file changed, 61 insertions(+), 48 deletions(-)
diff --git a/apps/govern/components/VeOlas/index.tsx b/apps/govern/components/VeOlas/index.tsx
index 0445c29c..24b55355 100644
--- a/apps/govern/components/VeOlas/index.tsx
+++ b/apps/govern/components/VeOlas/index.tsx
@@ -1,12 +1,14 @@
-import { Alert, Button, Card, Space, Typography } from 'antd';
-import { useState } from 'react';
-import styled from 'styled-components';
+import { Alert, Button, Card, Space, Typography } from "antd";
+import { useState } from "react";
+import styled from "styled-components";
-import { useFetchBalances } from 'hooks/index';
+import { useFetchBalances } from "hooks/index";
-import { CreateLockModal } from './CreateLockModal';
-import { IncreaseLockModal } from './IncreaseLockModal';
-import { VeOlasManage } from './VeOlasManage';
+import { CreateLockModal } from "./CreateLockModal";
+import { IncreaseLockModal } from "./IncreaseLockModal";
+import { VeOlasManage } from "./VeOlasManage";
+import { GetServerSideProps } from "next";
+import Head from "next/head";
const { Paragraph } = Typography;
@@ -23,53 +25,64 @@ const Title = styled.h1`
`;
export const VeOlasPage = () => {
- const { isLoading, canWithdrawVeolas, canIncreaseAmountOrUnlock } = useFetchBalances();
+ const { isLoading, canWithdrawVeolas, canIncreaseAmountOrUnlock } =
+ useFetchBalances();
- const [isCreateLockModalVisible, setIsCreateLockModalVisible] = useState(false);
+ const [isCreateLockModalVisible, setIsCreateLockModalVisible] =
+ useState(false);
const [isIncreaseModalVisible, setIsIncreaseModalVisible] = useState(false);
return (
-
-
- veOLAS
-
- veOLAS gives you voting power in Olas governance. Lock OLAS for longer periods to get more
- veOLAS.
-
-
-
+ <>
+
+ VeOlas
+
+
+
+ veOLAS
+
+ veOLAS gives you voting power in Olas governance. Lock OLAS for
+ longer periods to get more veOLAS.
+
+
+
- {canWithdrawVeolas && (
-
- )}
-
+ {canWithdrawVeolas && (
+
+ )}
+
-
+
-
-
-
-
+
+
+
+
+ >
);
};
From ed1b960fe969d96517d03b725c50e3090568ed33 Mon Sep 17 00:00:00 2001
From: atepem <57289722+atepem@users.noreply.github.com>
Date: Thu, 14 Nov 2024 11:52:17 +0000
Subject: [PATCH 2/3] chore: added meta tags to govern app
---
apps/govern/components/Meta.tsx | 63 ++++++++++++++
apps/govern/components/VeOlas/index.tsx | 111 +++++++++++-------------
apps/govern/pages/_app.tsx | 6 +-
apps/govern/pages/veolas.tsx | 14 ++-
4 files changed, 127 insertions(+), 67 deletions(-)
create mode 100644 apps/govern/components/Meta.tsx
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 24b55355..815de78a 100644
--- a/apps/govern/components/VeOlas/index.tsx
+++ b/apps/govern/components/VeOlas/index.tsx
@@ -1,14 +1,12 @@
-import { Alert, Button, Card, Space, Typography } from "antd";
-import { useState } from "react";
-import styled from "styled-components";
+import { Alert, Button, Card, Space, Typography } from 'antd';
+import { useState } from 'react';
+import styled from 'styled-components';
-import { useFetchBalances } from "hooks/index";
+import { useFetchBalances } from 'hooks/index';
-import { CreateLockModal } from "./CreateLockModal";
-import { IncreaseLockModal } from "./IncreaseLockModal";
-import { VeOlasManage } from "./VeOlasManage";
-import { GetServerSideProps } from "next";
-import Head from "next/head";
+import { CreateLockModal } from './CreateLockModal';
+import { IncreaseLockModal } from './IncreaseLockModal';
+import { VeOlasManage } from './VeOlasManage';
const { Paragraph } = Typography;
@@ -24,65 +22,54 @@ const Title = styled.h1`
margin: 0 0 8px;
`;
-export const VeOlasPage = () => {
- const { isLoading, canWithdrawVeolas, canIncreaseAmountOrUnlock } =
- useFetchBalances();
+export const VeOlas = () => {
+ const { isLoading, canWithdrawVeolas, canIncreaseAmountOrUnlock } = useFetchBalances();
- const [isCreateLockModalVisible, setIsCreateLockModalVisible] =
- useState(false);
+ const [isCreateLockModalVisible, setIsCreateLockModalVisible] = useState(false);
const [isIncreaseModalVisible, setIsIncreaseModalVisible] = useState(false);
return (
- <>
-
- VeOlas
-
-
-
- veOLAS
-
- veOLAS gives you voting power in Olas governance. Lock OLAS for
- longer periods to get more veOLAS.
-
-
-
+
+
+ veOLAS
+
+ veOLAS gives you voting power in Olas governance. Lock OLAS for longer periods to get more
+ veOLAS.
+
+
+
- {canWithdrawVeolas && (
-
- )}
-
+ {canWithdrawVeolas && (
+
+ )}
+
-
+
-
-
-
-
- >
+
+
+
+
);
};
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..7a2c3c93 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;
From 87a4e44abf04da67328f03b03955c3548ac36fd4 Mon Sep 17 00:00:00 2001
From: atepem <57289722+atepem@users.noreply.github.com>
Date: Thu, 14 Nov 2024 12:34:14 +0000
Subject: [PATCH 3/3] chore: fixed title for veOLAS
---
apps/govern/pages/veolas.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/govern/pages/veolas.tsx b/apps/govern/pages/veolas.tsx
index 7a2c3c93..7a1e9245 100644
--- a/apps/govern/pages/veolas.tsx
+++ b/apps/govern/pages/veolas.tsx
@@ -4,7 +4,7 @@ import { VeOlas } from '../components/VeOlas';
const VeOlasPage = () => (
<>