Skip to content

Commit

Permalink
fix(dao): add version label, fix styles (#1098)
Browse files Browse the repository at this point in the history
Co-authored-by: Overzunov <[email protected]>
  • Loading branch information
VERZUOL1 and Overzunov authored May 20, 2022
1 parent 1758822 commit 9ddddfc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions astro_2.0/components/CreationProgress/CreationProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const CreationProgress: VFC<CreationProgressProps> = ({

return (
<CreationProgressStep
key={value}
label={label}
value={value}
isCurrent={isCurrent}
Expand Down
13 changes: 13 additions & 0 deletions astro_2.0/features/DaoDashboardHeader/DaoDashboardHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { JoinDaoButton } from 'astro_2.0/features/DaoDashboardHeader/components/
import { FollowButton } from 'astro_2.0/features/DaoDashboardHeader/components/FollowButton';
import { DaoLogo } from 'astro_2.0/features/DaoDashboardHeader/components/DaoLogo';
import { ShowMoreLinks } from 'astro_2.0/features/DaoDashboardHeader/components/DaoLinks/components/ShowMoreLinks';
import { CopyButton } from 'astro_2.0/components/CopyButton';

import { useWalletContext } from 'context/WalletContext';
import { UserPermissions } from 'types/context';
Expand Down Expand Up @@ -45,6 +46,7 @@ export const DaoDashboardHeader: FC<DaoDashboardHeaderProps> = ({
members,
description,
links,
daoVersion,
} = dao;
const { accountId } = useWalletContext();
const { t } = useTranslation();
Expand All @@ -70,6 +72,17 @@ export const DaoDashboardHeader: FC<DaoDashboardHeaderProps> = ({
}}
>
<DaoLogo src={flagLogo} className={styles.logo} />
{daoVersion && (
<div className={styles.currentDaoVersion}>
DAO Version:&nbsp;<b>{daoVersion?.version.join('.')}</b>
<CopyButton
defaultTooltip="Copy hash"
text={daoVersion.hash}
className={styles.copyHash}
iconClassName={styles.copyIcon}
/>
</div>
)}
</section>

<section className={styles.usersSection}>
Expand Down
1 change: 1 addition & 0 deletions astro_2.0/features/DaoDashboardHeader/tests/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const dao = ({
description: daoDescription,
links: ['DL1', 'DL2'],
daoVersion: {
version: [2, 0],
hash: 'qwerty',
},
} as unknown) as DAO;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.root {
align-items: center;
background-color: var(--color-primary-50);
background-color: var(--color-brand-black);
border-radius: 4px 4px 0 0;
color: var(--color-white);
display: flex;
Expand Down

0 comments on commit 9ddddfc

Please sign in to comment.