Skip to content

Commit

Permalink
Merge branch 'develop' into fix/show-token-prices
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrila committed Mar 6, 2024
2 parents 50e148d + e229bb0 commit 88899cf
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 83 deletions.
1 change: 0 additions & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import ExternalLink from '../src/components/ui/links/ExternalLink';
import ClientOnly from '../src/components/ui/utils/ClientOnly';
import { BASE_ROUTES } from '../src/constants/routes';
import { URL_DOCS } from '../src/constants/url';
import ethLizardsLogo from '../src/metadata/lizzardsDAO/assets/logo.png';
import { useFractal } from '../src/providers/App/AppProvider';
import { disconnectedChain } from '../src/providers/NetworkConfig/NetworkConfigProvider';

Expand Down
31 changes: 0 additions & 31 deletions docs/RELEASES.md

This file was deleted.

1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "fractal-interface",
"version": "0.1.8",
"private": true,
"dependencies": {
"@apollo/client": "^3.7.10",
Expand Down Expand Up @@ -55,13 +54,9 @@
"scripts": {
"lint": "next lint",
"lint:fix": "next lint --fix",
"set:env": "GENERATE_SOURCEMAP=false NEXT_PUBLIC_GIT_HASH=`git rev-parse HEAD`",
"dev": "npm run set:env & next dev",
"start": "npm run set:env & next start",
"start:https": "npm run set:env & HTTPS=true next start",
"start:windows": "set \"GENERATE_SOURCEMAP=false\" && for /F \"delims=\" %I in ('git rev-parse HEAD') do set \"NEXT_PUBLIC_GIT_HASH=%I\" && next start",
"dev": "npm run graphql:build && NEXT_PUBLIC_GIT_HASH=`git rev-parse HEAD` next dev",
"start": "next start",
"build": "npm run graphql:build && NEXT_PUBLIC_GIT_HASH=`git rev-parse HEAD` next build",
"build:windows": "for /F \"delims=\" %I in ('git rev-parse HEAD') do set \"NEXT_PUBLIC_GIT_HASH=%I\" && next build",
"graphql:build": "graphclient build",
"graphql:dev-server": "graphclient serve-dev",
"test": "vitest --dir=test",
Expand Down
27 changes: 2 additions & 25 deletions src/components/Proposals/ProposalActions/ProposalAction.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { Button, Flex, Text } from '@chakra-ui/react';
import Link from 'next/link';
import { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { BACKGROUND_SEMI_TRANSPARENT } from '../../../constants/common';
import { DAO_ROUTES } from '../../../constants/routes';
import useSnapshotProposal from '../../../hooks/DAO/loaders/snapshot/useSnapshotProposal';
import { useFractal } from '../../../providers/App/AppProvider';
import { ExtendedSnapshotProposal, FractalProposal, FractalProposalState } from '../../../types';
Expand Down Expand Up @@ -52,7 +50,6 @@ export function ProposalAction({
onCastSnapshotVote?: () => Promise<void>;
}) {
const {
node: { daoAddress },
readOnly: { user, dao },
} = useFractal();
const { t } = useTranslation();
Expand Down Expand Up @@ -102,15 +99,7 @@ export function ProposalAction({

if (!showActionButton) {
if (!expandedView) {
return (
<Button
as={Link}
href={DAO_ROUTES.proposal.relative(daoAddress, proposal.proposalId)}
variant="secondary"
>
{t('details')}
</Button>
);
return <Button variant="secondary">{t('details')}</Button>;
}
// This means that Proposal in state where there's no action to perform
return null;
Expand Down Expand Up @@ -139,17 +128,5 @@ export function ProposalAction({
);
}

return (
<Link
href={DAO_ROUTES.proposal.relative(daoAddress, proposal.proposalId)}
passHref
>
<Button
as="a"
variant={showActionButton && canVote ? 'primary' : 'secondary'}
>
{label}
</Button>
</Link>
);
return <Button variant={showActionButton && canVote ? 'primary' : 'secondary'}>{label}</Button>;
}
39 changes: 21 additions & 18 deletions src/components/pages/AppHome/AppFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Box, BoxProps, Divider, Flex, Link, Spacer, Text } from '@chakra-ui/react';
import { Trans, useTranslation } from 'react-i18next';
import packageJson from '../../../../package.json';
import { URL_DECENT } from '../../../constants/url';
import ExternalLink from '../../ui/links/ExternalLink';

Expand Down Expand Up @@ -42,23 +41,27 @@ export function AppFooter({ ...rest }: BoxProps) {
>
{t('audit')}
</ExternalLink>
<Text
color="grayscale.100"
textStyle="text-sm-mono-bold"
paddingStart="1rem"
paddingEnd="1rem"
>
|
</Text>
<ExternalLink
href={
'https://github.com/decent-dao/fractal-interface/commit/' +
process.env.NEXT_PUBLIC_GIT_HASH
}
textStyle="text-sm-mono-bold"
>
v{packageJson.version}
</ExternalLink>
{process.env.NEXT_PUBLIC_GIT_HASH !== undefined && (
<>
<Text
color="grayscale.100"
textStyle="text-sm-mono-bold"
paddingStart="1rem"
paddingEnd="1rem"
>
|
</Text>
<ExternalLink
href={
'https://github.com/decent-dao/fractal-interface/commit/' +
process.env.NEXT_PUBLIC_GIT_HASH
}
textStyle="text-sm-mono-bold"
>
{process.env.NEXT_PUBLIC_GIT_HASH.substring(0, 7)}
</ExternalLink>
</>
)}
</Flex>
</Box>
);
Expand Down

0 comments on commit 88899cf

Please sign in to comment.