Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added title to Veolas for duplicate title error in SEMrush #135

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions apps/govern/components/Meta.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<Head>
{/* <!-- Primary Meta Tags --> */}
<title>{title}</title>
<meta name="title" content={title} key="title" />
<meta name="description" content={description || SITE_DESCRIPTION} key="description" />

{/* <!-- Open Graph / Facebook --> */}
<meta property="og:type" content="website" key="og:type" />
<meta property="og:url" content={url} key="og:url" />
<meta property="og:title" content={title} key="og:title" />
<meta
property="og:description"
content={description || SITE_DESCRIPTION}
key="og:description"
/>

{/* <!-- Twitter --> */}
<meta property="twitter:card" content="summary_large_image" key="twitter:card" />
<meta property="twitter:url" content={url} key="twitter:url" />
<meta property="twitter:title" content={title} key="twitter:title" />
<meta
property="twitter:description"
content={description || SITE_DESCRIPTION}
key="twitter:description"
/>
</Head>
);
};

Meta.propTypes = {
pageTitle: PropTypes.string,
description: PropTypes.string,
pageUrl: PropTypes.string,
};
Meta.defaultProps = {
pageTitle: null,
description: SITE_DESCRIPTION,
pageUrl: '',
};

export default Meta;
2 changes: 1 addition & 1 deletion apps/govern/components/VeOlas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions apps/govern/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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<PropsWithChildren> = ({ children }) => {
useFetchStakingContractsList();
Expand All @@ -25,9 +25,7 @@ const GovernApp = ({ Component, ...rest }: AppProps) => {
return (
<>
<GlobalStyles />
<Head>
<title>Govern</title>
</Head>
<Meta />

<Provider store={store}>
<AutonolasThemeProvider>
Expand Down
14 changes: 13 additions & 1 deletion apps/govern/pages/veolas.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
import { VeOlasPage } from '../components/VeOlas';
import Meta from 'components/Meta';
import { VeOlas } from '../components/VeOlas';

const VeOlasPage = () => (
<>
<Meta
pageTitle="veOlas"
description="Easily check, manage, and optimize your veOLAS balance to actively participate in decisions shaping the future of the Olas network."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pageTitle="veOlas"
pageTitle="veOLAS"

pageUrl="veOlas"
/>
<VeOlas />
</>
);

export default VeOlasPage;
Loading