Skip to content

Commit

Permalink
feat(LatestProposalsTable): add message for no proposals found
Browse files Browse the repository at this point in the history
  • Loading branch information
shenshin committed Nov 20, 2024
1 parent 29651ae commit d6980f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/proposals/LatestProposalsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useFetchAllProposals } from '@/app/proposals/hooks/useFetchLatestPropos
import { EventArgumentsParameter, getEventArguments } from '@/app/proposals/shared/utils'
import { StatusColumn } from '@/app/proposals/StatusColumn'
import { Table } from '@/components/Table'
import { HeaderTitle } from '@/components/Typography'
import { HeaderTitle, Typography } from '@/components/Typography'
import { SharedProposalsTableContextProvider } from '@/app/proposals/SharedProposalsTableContext'
import { ProposalsContextProvider } from '@/app/proposals/ProposalsContext'
import { SentimentColumn } from '@/app/proposals/SentimentColumn'
Expand Down Expand Up @@ -64,7 +64,7 @@ const LatestProposalsTable = ({ latestProposals }: LatestProposalsTableProps) =>
<div>
<HeaderTitle className="mb-4">Latest Proposals</HeaderTitle>
<DebounceSearch placeholder="Search a proposal" onSearchSubmit={onSearchSubmit} />
{latestProposalsMapped.length > 0 && (
{latestProposalsMapped.length > 0 ? (
<SharedProposalsTableContextProvider>
<Table
key={latestProposalsMapped.length}
Expand All @@ -76,6 +76,8 @@ const LatestProposalsTable = ({ latestProposals }: LatestProposalsTableProps) =>
className="overflow-visible"
/>
</SharedProposalsTableContextProvider>
) : (
<Typography tagVariant="p">No proposals found &#x1F622;</Typography>
)}
</div>
)
Expand Down

0 comments on commit d6980f9

Please sign in to comment.