Skip to content

Commit

Permalink
fix: type issue in ShowValue
Browse files Browse the repository at this point in the history
  • Loading branch information
AMIRKHANEF committed Nov 24, 2024
1 parent 7c05b58 commit 618ba61
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/extension-polkagate/src/components/ShowValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@
/**
* @description this component is used to show an account balance in some pages like contributeToCrowdloan
* */
import type { BN } from '@polkadot/util';

import { Skeleton } from '@mui/material';
import React from 'react';

export interface Props {
value: number | string | BN | null | undefined;
value: number | string | null | undefined;
height?: number;
unit?: string;
width?: string;
}

export default function ShowValue ({ height = 20, unit, value, width = '90px' }: Props): React.ReactElement<Props> {
export default function ShowValue ({ height = 20, unit = '', value, width = '90px' }: Props): React.ReactElement<Props> {
return (
<>
{value !== undefined
? `${value} ${unit}`
? <>{value}{' '}{unit}</>
: <Skeleton
animation='wave'
height={height}
Expand Down

0 comments on commit 618ba61

Please sign in to comment.