mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 15:23:38 +01:00
Fix data check in tables.
This commit is contained in:
parent
943c2c73d4
commit
8b9c3350b2
@ -87,7 +87,7 @@ export default function MetricsTable({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.body}>
|
<div className={styles.body}>
|
||||||
{data?.length === 0 && (
|
{rankings?.length === 0 && (
|
||||||
<div className={styles.empty}>
|
<div className={styles.empty}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="message.no-data-available"
|
id="message.no-data-available"
|
||||||
@ -97,14 +97,14 @@ export default function MetricsTable({
|
|||||||
)}
|
)}
|
||||||
{limit
|
{limit
|
||||||
? rankings.map(row => getRow(row))
|
? rankings.map(row => getRow(row))
|
||||||
: data?.length > 0 && (
|
: rankings.length > 0 && (
|
||||||
<FixedSizeList height={500} itemCount={rankings.length} itemSize={30}>
|
<FixedSizeList height={500} itemCount={rankings.length} itemSize={30}>
|
||||||
{Row}
|
{Row}
|
||||||
</FixedSizeList>
|
</FixedSizeList>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.footer}>
|
<div className={styles.footer}>
|
||||||
{limit && data.length > limit && (
|
{limit && rankings.length > limit && (
|
||||||
<Button icon={<Arrow />} size="xsmall" onClick={() => onExpand(type)}>
|
<Button icon={<Arrow />} size="xsmall" onClick={() => onExpand(type)}>
|
||||||
<div>
|
<div>
|
||||||
<FormattedMessage id="button.more" defaultMessage="More" />
|
<FormattedMessage id="button.more" defaultMessage="More" />
|
||||||
|
Loading…
Reference in New Issue
Block a user