Skip to content

Commit bd24328

Browse files
Merge branch 'main' of github.com:curvefi/curve-frontend into fix/dex-small-pools
2 parents e3c641d + 710119e commit bd24328

File tree

5 files changed

+58
-6
lines changed

5 files changed

+58
-6
lines changed

apps/main/src/llamalend/features/market-list/LlamaMarketsTable.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import lodash from 'lodash'
22
import { useMemo, useState } from 'react'
33
import { type LlamaMarketsResult } from '@/llamalend/entities/llama-markets'
44
import { ChainFilterChip } from '@/llamalend/features/market-list/chips/ChainFilterChip'
5+
import Button from '@mui/material/Button'
56
import { ColumnFiltersState, ExpandedState, useReactTable } from '@tanstack/react-table'
67
import { useUserProfileStore } from '@ui-kit/features/user-profile'
78
import { SMALL_POOL_TVL } from '@ui-kit/features/user-profile/store'
@@ -11,6 +12,7 @@ import type { MigrationOptions } from '@ui-kit/hooks/useStoredState'
1112
import { t } from '@ui-kit/lib/i18n'
1213
import { getTableOptions } from '@ui-kit/shared/ui/DataTable/data-table.utils'
1314
import { DataTable } from '@ui-kit/shared/ui/DataTable/DataTable'
15+
import { EmptyStateCard } from '@ui-kit/shared/ui/EmptyStateCard'
1416
import { EmptyStateRow } from '@ui-kit/shared/ui/DataTable/EmptyStateRow'
1517
import { useColumnFilters } from '@ui-kit/shared/ui/DataTable/hooks/useColumnFilters'
1618
import { TableFilters } from '@ui-kit/shared/ui/DataTable/TableFilters'
@@ -83,7 +85,17 @@ export const LlamaMarketsTable = ({
8385
<DataTable
8486
table={table}
8587
emptyState={
86-
<EmptyStateRow table={table}>{isError ? t`Could not load markets` : t`No markets found`}</EmptyStateRow>
88+
<EmptyStateRow table={table}>
89+
<EmptyStateCard
90+
title={isError ? t`Could not load markets` : t`No markets found`}
91+
subtitle={isError ? undefined : t`Try adjusting your filters or search query`}
92+
action={
93+
<Button size="small" onClick={isError ? onReload : resetFilters}>
94+
{isError ? t`Reload` : t`Show All Markets`}
95+
</Button>
96+
}
97+
/>
98+
</EmptyStateRow>
8799
}
88100
expandedPanel={LlamaMarketExpandedPanel}
89101
shouldStickFirstColumn={Boolean(useIsTablet() && userHasPositions)}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
]
5858
},
5959
"resolutions": {
60-
"@curvefi/api": "2.68.15",
60+
"@curvefi/api": "2.68.16",
6161
"@eslint/eslintrc": "3.3.1",
6262
"@eslint/js": "9.39.0",
6363
"@types/node": "24.10.0",
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { ReactNode } from 'react'
2+
import Stack from '@mui/material/Stack'
3+
import Typography from '@mui/material/Typography'
4+
import { LlamaIcon } from '@ui-kit/shared/icons/LlamaIcon'
5+
import { SizesAndSpaces } from '@ui-kit/themes/design/1_sizes_spaces'
6+
7+
const { Spacing, IconSize, MaxWidth } = SizesAndSpaces
8+
9+
export const EmptyStateCard = ({
10+
title,
11+
subtitle,
12+
action,
13+
}: {
14+
title: string
15+
subtitle?: string
16+
action?: ReactNode
17+
}) => (
18+
<Stack
19+
direction="column"
20+
gap={Spacing.sm}
21+
alignItems="center"
22+
justifySelf="center"
23+
sx={{ maxWidth: MaxWidth.emptyStateCard }}
24+
>
25+
<LlamaIcon sx={{ width: IconSize.xxl, height: IconSize.xxl }} />
26+
{/* Needed because no gap between the title and subtitle */}
27+
<Stack direction="column">
28+
<Typography component="span" variant="headingSBold">
29+
{title}
30+
</Typography>
31+
{subtitle && (
32+
<Typography component="span" variant="bodyMRegular" color="text.secondary">
33+
{subtitle}
34+
</Typography>
35+
)}
36+
</Stack>
37+
{action}
38+
</Stack>
39+
)

packages/curve-ui-kit/src/themes/design/1_sizes_spaces.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ export const SizesAndSpaces = {
310310
footer: '96rem', // 1536px
311311
connectWallet: '50rem', // 800px
312312
actionCard: '29rem', // 464px
313+
emptyStateCard: '27.5rem', // 440px
313314
section: '59.5rem', // 952px
314315
tooltip: '27.5rem', // 440px
315316
},

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -710,15 +710,15 @@ __metadata:
710710
languageName: node
711711
linkType: hard
712712

713-
"@curvefi/api@npm:2.68.15":
714-
version: 2.68.15
715-
resolution: "@curvefi/api@npm:2.68.15"
713+
"@curvefi/api@npm:2.68.16":
714+
version: 2.68.16
715+
resolution: "@curvefi/api@npm:2.68.16"
716716
dependencies:
717717
"@curvefi/ethcall": "npm:^6.0.16"
718718
bignumber.js: "npm:^9.3.1"
719719
ethers: "npm:^6.15.0"
720720
memoizee: "npm:^0.4.17"
721-
checksum: 10c0/d1daafc97954fed7d2f539b9bcbe57749a29e4b76263ff84d041d94d7d6dc004ae47ce7f2d23873786bd7a0c22cc304833c686bf2d444463a77135f95cfc2451
721+
checksum: 10c0/b547531b10b343f9df4c9ff38eb37ec389fcdf1723ed79e615480058e4a595b193ac05b9a0334ff85e150cd2db8e5fffd22b163800311537b47e973f5e46b519
722722
languageName: node
723723
linkType: hard
724724

0 commit comments

Comments
 (0)