Compare commits

..
Author SHA1 Message Date
Matthew Russell 64ea7e7bd3 chore: move banner above nav 2023-03-10 15:22:24 -08:00
4 changed files with 1464 additions and 1664 deletions
@@ -176,14 +176,25 @@ export const ValidatorsPage = () => {
const validatorName =
v.name && v.name.length > 0 ? v.name : truncateMiddle(v.id);
return (
<li className="mb-5 relative" key={v.id}>
<li className="mb-5" key={v.id}>
<div
data-testid="validator-tile"
validator-id={v.id}
className="border border-vega-light-200 dark:border-vega-dark-200 rounded p-2 overflow-hidden"
className="border border-vega-light-200 dark:border-vega-dark-200 rounded p-2 overflow-hidden relative flex gap-2 items-start justify-between"
>
{v.avatarUrl && (
<div className="w-20">
<ExternalLink href={validatorPage}>
<img
className="w-full"
src={v.avatarUrl}
alt={validatorName}
/>
</ExternalLink>
</div>
)}
<div className="w-full">
<h2 className="font-alpha text-2xl leading-[60px]">
<h2 className="font-alpha text-2xl">
<ExternalLink href={validatorPage}>
{validatorName}
</ExternalLink>
@@ -304,23 +315,6 @@ export const ValidatorsPage = () => {
</div>
</div>
</KeyValueTableRow>
{v.avatarUrl && (
<KeyValueTableRow>
<div>{t('Avatar')}</div>
<div>
<ExternalLink
href={validatorPage}
className="mx-auto"
>
<img
className="max-w-[75px] md:max-w-[200px] max-h-[80px]"
src={v.avatarUrl}
alt={validatorName}
/>
</ExternalLink>
</div>
</KeyValueTableRow>
)}
</KeyValueTable>
</div>
</div>
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -83,8 +83,8 @@ function AppBody({ Component }: AppProps) {
</Head>
<Title />
<div className={gridClasses}>
<Navbar theme={VEGA_ENV === Networks.TESTNET ? 'yellow' : 'system'} />
<Banner />
<Navbar theme={VEGA_ENV === Networks.TESTNET ? 'yellow' : 'system'} />
<ViewingBanner />
<main data-testid={location.pathname}>
<Component />
+18 -7
View File
@@ -134,10 +134,6 @@ export const LedgerTable = forwardRef<AgGridReact, LedgerEntryProps>(
headerName={t('Transfer type')}
field="transferType"
tooltipField="transferType"
filter={SetFilter}
filterParams={{
set: TransferTypeMapping,
}}
valueFormatter={({
value,
}: VegaValueFormatterParams<LedgerEntry, 'transferType'>) =>
@@ -151,9 +147,14 @@ export const LedgerTable = forwardRef<AgGridReact, LedgerEntryProps>(
value,
data,
}: VegaValueFormatterParams<LedgerEntry, 'quantity'>) => {
const marketDecimalPlaces = data?.marketSender?.decimalPlaces;
const assetDecimalPlaces = data?.asset?.decimals || 0;
return value
? addDecimalsFormatNumber(value, assetDecimalPlaces)
? addDecimalsFormatNumber(
value,
assetDecimalPlaces,
marketDecimalPlaces
)
: value;
}}
/>
@@ -174,9 +175,14 @@ export const LedgerTable = forwardRef<AgGridReact, LedgerEntryProps>(
value,
data,
}: VegaValueFormatterParams<LedgerEntry, 'fromAccountBalance'>) => {
const marketDecimalPlaces = data?.marketSender?.decimalPlaces;
const assetDecimalPlaces = data?.asset?.decimals || 0;
return value
? addDecimalsFormatNumber(value, assetDecimalPlaces)
? addDecimalsFormatNumber(
value,
assetDecimalPlaces,
marketDecimalPlaces
)
: value;
}}
/>
@@ -187,9 +193,14 @@ export const LedgerTable = forwardRef<AgGridReact, LedgerEntryProps>(
value,
data,
}: VegaValueFormatterParams<LedgerEntry, 'toAccountBalance'>) => {
const marketDecimalPlaces = data?.marketReceiver?.decimalPlaces;
const assetDecimalPlaces = data?.asset?.decimals || 0;
return value
? addDecimalsFormatNumber(value, assetDecimalPlaces)
? addDecimalsFormatNumber(
value,
assetDecimalPlaces,
marketDecimalPlaces
)
: value;
}}
/>