Skip to content

Commit

Permalink
fix: replace in [proposalId].governance.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh DeCristi committed Apr 15, 2023
1 parent f578b2e commit 51e5183
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
30 changes: 6 additions & 24 deletions pages/governance/proposal/[proposalId].governance.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { normalize } from '@aave/math-utils';
import { DownloadIcon, ExternalLinkIcon } from '@heroicons/react/solid';
import { DownloadIcon } from '@heroicons/react/solid';
import { Trans } from '@lingui/macro';
import { Twitter } from '@mui/icons-material';
import {
Expand All @@ -24,10 +24,10 @@ import dayjs from 'dayjs';
import { useEffect, useState } from 'react';
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
import ExternalLinkButton from 'src/components/ExternalLinkButton';
import { Meta } from 'src/components/Meta';
import { CheckBadge } from 'src/components/primitives/CheckBadge';
import { FormattedNumber } from 'src/components/primitives/FormattedNumber';
import { Link } from 'src/components/primitives/Link';
import { Row } from 'src/components/primitives/Row';
import { Warning } from 'src/components/primitives/Warning';
import { GovVoteModal } from 'src/components/transactions/GovVote/GovVoteModal';
Expand Down Expand Up @@ -587,38 +587,20 @@ export default function ProposalPage({
)}
<Box sx={{ mt: 10, mb: 2, display: 'flex', gap: 2 }}>
{ipfs?.discussions && (
<Button
component={Link}
target="_blank"
rel="noopener"
href={ipfs.discussions}
variant="outlined"
endIcon={
<SvgIcon>
<ExternalLinkIcon />
</SvgIcon>
}
>
<ExternalLinkButton target="_blank" rel="noopener" href={ipfs.discussions}>
<Trans>Forum discussion</Trans>
</Button>
</ExternalLinkButton>
)}
{prerendered && ( // only render the button for prerendered proposals as fro them we can be sure ci already ran
<Button
component={Link}
<ExternalLinkButton
target="_blank"
rel="noopener"
href={`https://github.com/bgd-labs/seatbelt-for-ghosts/tree/master/reports/Aave/0xEC568fffba86c094cf06b22134B23074DFE2252c/${String(
proposal.id
).padStart(3, '0')}.md`}
variant="outlined"
endIcon={
<SvgIcon>
<ExternalLinkIcon />
</SvgIcon>
}
>
<Trans>Seatbelt report</Trans>
</Button>
</ExternalLinkButton>
)}
</Box>
</>
Expand Down
6 changes: 2 additions & 4 deletions src/components/ExternalLinkButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import { ExternalLinkIcon } from '@heroicons/react/outline';
import { Button, ButtonProps, SvgIcon } from '@mui/material';
import { forwardRef } from 'react';

import { Link } from './primitives/Link';
import { Link, LinkProps } from './primitives/Link';

interface ExternalLinkButtonProps extends ButtonProps {
href: string;
}
type ExternalLinkButtonProps = ButtonProps & LinkProps;

const ExternalLinkButton = forwardRef<HTMLAnchorElement, ExternalLinkButtonProps>((props, ref) => (
<Link href={props.href} ref={ref}>
Expand Down

0 comments on commit 51e5183

Please sign in to comment.