-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* proposal grace period added * proposed changes * proposed changes * Show `exactExecutionBlock` is stories * change block network to optional * block time renderer * block time display * yarn lint fix * Number of Blocks and BlockTimeDisplay * Number of Blocks and BlockTimeDisplay * Number of Blocks and BlockTimeDisplay * last change * last change --------- Co-authored-by: Theophile Sandoz <[email protected]>
- Loading branch information
Showing
8 changed files
with
70 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/ui/src/proposals/components/ProposalDetails/renderers/BlockTimeDisplay.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react' | ||
|
||
import { BlockTime } from '@/common/components/BlockTime' | ||
import { StatisticItem } from '@/common/components/statistics' | ||
import { Block } from '@/common/types' | ||
|
||
interface Props { | ||
label: string | ||
value: Block | ||
} | ||
export const BlockTimeDisplay = ({ label, value }: Props) => { | ||
return ( | ||
<StatisticItem title={label}> | ||
<BlockTime block={value} /> | ||
</StatisticItem> | ||
) | ||
} |
12 changes: 2 additions & 10 deletions
12
packages/ui/src/proposals/components/ProposalDetails/renderers/NumberOfBlocks.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,11 @@ | ||
import BN from 'bn.js' | ||
import React from 'react' | ||
|
||
import { StatisticItem } from '@/common/components/statistics' | ||
import { TextInlineBig } from '@/common/components/typography' | ||
import { formatTokenValue } from '@/common/model/formatters' | ||
import { BlockDurationStatistics } from '@/common/components/statistics' | ||
|
||
interface Props { | ||
label: string | ||
value: BN | ||
} | ||
|
||
export const NumberOfBlocks = ({ label, value }: Props) => ( | ||
<StatisticItem title={label}> | ||
<TextInlineBig bold value> | ||
{formatTokenValue(value)} blocks | ||
</TextInlineBig> | ||
</StatisticItem> | ||
) | ||
export const NumberOfBlocks = ({ label, value }: Props) => <BlockDurationStatistics title={label} value={value} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99ca49e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
pioneer-2-storybook – ./
pioneer-2-storybook.vercel.app
pioneer-2-storybook-joystream.vercel.app
pioneer-2-storybook-git-dev-joystream.vercel.app
99ca49e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
pioneer-2 – ./
pioneer-2-git-dev-joystream.vercel.app
pioneer-2.vercel.app
pioneer-2-joystream.vercel.app