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
Changes from 1 commit
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
109 changes: 61 additions & 48 deletions apps/govern/components/VeOlas/index.tsx
Original file line number Diff line number Diff line change
@@ -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";

Check failure on line 1 in apps/govern/components/VeOlas/index.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `"antd"` with `'antd'`
import { useState } from "react";

Check failure on line 2 in apps/govern/components/VeOlas/index.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `"react"` with `'react'`
import styled from "styled-components";

Check failure on line 3 in apps/govern/components/VeOlas/index.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `"styled-components"` with `'styled-components'`

import { useFetchBalances } from 'hooks/index';
import { useFetchBalances } from "hooks/index";

Check failure on line 5 in apps/govern/components/VeOlas/index.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `"hooks/index"` with `'hooks/index'`

import { CreateLockModal } from './CreateLockModal';
import { IncreaseLockModal } from './IncreaseLockModal';
import { VeOlasManage } from './VeOlasManage';
import { CreateLockModal } from "./CreateLockModal";

Check failure on line 7 in apps/govern/components/VeOlas/index.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `"./CreateLockModal"` with `'./CreateLockModal'`
import { IncreaseLockModal } from "./IncreaseLockModal";

Check failure on line 8 in apps/govern/components/VeOlas/index.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `"./IncreaseLockModal"` with `'./IncreaseLockModal'`
import { VeOlasManage } from "./VeOlasManage";

Check failure on line 9 in apps/govern/components/VeOlas/index.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `"./VeOlasManage"` with `'./VeOlasManage'`
import { GetServerSideProps } from "next";

Check failure on line 10 in apps/govern/components/VeOlas/index.tsx

View workflow job for this annotation

GitHub Actions / build

'GetServerSideProps' is defined but never used

Check failure on line 10 in apps/govern/components/VeOlas/index.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `"next"` with `'next'`
import Head from "next/head";

Check failure on line 11 in apps/govern/components/VeOlas/index.tsx

View workflow job for this annotation

GitHub Actions / build

Replace `"next/head"` with `'next/head'`
Copy link
Collaborator

Choose a reason for hiding this comment

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

your linter is not working 🥲


const { Paragraph } = Typography;

Expand All @@ -23,53 +25,64 @@
`;

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 (
<StyledMain>
<Card>
<Title>veOLAS</Title>
<Paragraph type="secondary" className="mt-8 mb-24">
veOLAS gives you voting power in Olas governance. Lock OLAS for longer periods to get more
veOLAS.
</Paragraph>
<Space size="middle" className="mb-16">
<Button
type="primary"
size="large"
disabled={isLoading || !!canWithdrawVeolas}
onClick={() => {
// if the user has veolas, then show the modal to increase the amount
// else show the modal to create a lock
if (canIncreaseAmountOrUnlock) {
setIsIncreaseModalVisible(true);
} else {
setIsCreateLockModalVisible(true);
}
}}
>
Lock OLAS for veOLAS
</Button>
<>
<Head>
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you please add the whole meta block to govern app similar to one that we have on olas website or contribute or in bond app here apps/bond/pages/_app.jsx? currently govern app is not searchable in google :( I probably forgot to add that when created the app

<title>VeOlas</title>
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be veOLAS

Copy link
Collaborator

Choose a reason for hiding this comment

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

or maybe Govern | veOLAS

</Head>
<StyledMain>
<Card>
<Title>veOLAS</Title>
<Paragraph type="secondary" className="mt-8 mb-24">
veOLAS gives you voting power in Olas governance. Lock OLAS for
longer periods to get more veOLAS.
</Paragraph>
<Space size="middle" className="mb-16">
<Button
type="primary"
size="large"
disabled={isLoading || !!canWithdrawVeolas}
onClick={() => {
// if the user has veolas, then show the modal to increase the amount
// else show the modal to create a lock
if (canIncreaseAmountOrUnlock) {
setIsIncreaseModalVisible(true);
} else {
setIsCreateLockModalVisible(true);
}
}}
>
Lock OLAS for veOLAS
</Button>

{canWithdrawVeolas && (
<Alert message="Please claim your OLAS before locking again" type="warning" showIcon />
)}
</Space>
{canWithdrawVeolas && (
<Alert
message="Please claim your OLAS before locking again"
type="warning"
showIcon
/>
)}
</Space>

<VeOlasManage />
<VeOlasManage />

<CreateLockModal
isModalVisible={isCreateLockModalVisible}
setIsModalVisible={setIsCreateLockModalVisible}
/>
<IncreaseLockModal
isModalVisible={isIncreaseModalVisible}
setIsModalVisible={setIsIncreaseModalVisible}
/>
</Card>
</StyledMain>
<CreateLockModal
isModalVisible={isCreateLockModalVisible}
setIsModalVisible={setIsCreateLockModalVisible}
/>
<IncreaseLockModal
isModalVisible={isIncreaseModalVisible}
setIsModalVisible={setIsIncreaseModalVisible}
/>
</Card>
</StyledMain>
</>
);
};
Loading