diff --git a/.changelog/1932.bugfix.md b/.changelog/1932.bugfix.md
new file mode 100644
index 0000000000..dfad078a6c
--- /dev/null
+++ b/.changelog/1932.bugfix.md
@@ -0,0 +1 @@
+Use EmptyState instead of CardEmptyState for empty lists.
diff --git a/src/app/components/RuntimeEvents/RuntimeEventsDetailedList.tsx b/src/app/components/RuntimeEvents/RuntimeEventsDetailedList.tsx
index 3b952da7c1..2203adf9c8 100644
--- a/src/app/components/RuntimeEvents/RuntimeEventsDetailedList.tsx
+++ b/src/app/components/RuntimeEvents/RuntimeEventsDetailedList.tsx
@@ -18,10 +18,21 @@ export const RuntimeEventsDetailedList: FC<{
showTxHash: boolean
}> = ({ scope, events, isLoading, isError, pagination, showTxHash }) => {
const { t } = useTranslation()
+
+ if (isError) {
+ return
+ }
+
+ if (isLoading) {
+ return
+ }
+
+ if (!events?.length) {
+ return
+ }
+
return (
<>
- {isError && }
- {isLoading && }
{events &&
events.map((event, index) => (
diff --git a/src/app/components/Transactions/ConsensusTransactionEvents.tsx b/src/app/components/Transactions/ConsensusTransactionEvents.tsx
index 01f9cec62b..721f58b8f3 100644
--- a/src/app/components/Transactions/ConsensusTransactionEvents.tsx
+++ b/src/app/components/Transactions/ConsensusTransactionEvents.tsx
@@ -5,7 +5,7 @@ import { AppErrors } from '../../../types/errors'
import { NUMBER_OF_ITEMS_ON_SEPARATE_PAGE as limit } from '../../config'
import { ConsensusEventsList } from '../ConsensusEvents/ConsensusEventsList'
import { useSearchParamsPagination } from '../Table/useSearchParamsPagination'
-import { EmptyState } from '../EmptyState'
+import { CardEmptyState } from '../CardEmptyState'
export const ConsensusTransactionEvents: FC<{
transaction: Transaction
@@ -25,9 +25,7 @@ export const ConsensusTransactionEvents: FC<{
}
if (!events?.length && isFetched) {
- return (
-
- )
+ return
}
return (
diff --git a/src/app/pages/ConsensusAccountDetailsPage/ConsensusAccountEventsCard.tsx b/src/app/pages/ConsensusAccountDetailsPage/ConsensusAccountEventsCard.tsx
index a353ece0bb..dea9ac8d53 100644
--- a/src/app/pages/ConsensusAccountDetailsPage/ConsensusAccountEventsCard.tsx
+++ b/src/app/pages/ConsensusAccountDetailsPage/ConsensusAccountEventsCard.tsx
@@ -7,8 +7,8 @@ import { ConsensusAccountDetailsContext } from './hooks'
import { NUMBER_OF_ITEMS_ON_SEPARATE_PAGE as limit } from '../../config'
import { LinkableCardLayout } from '../../components/LinkableCardLayout'
import { useSearchParamsPagination } from '../..//components/Table/useSearchParamsPagination'
-import { EmptyState } from '../../components/EmptyState'
import { eventsContainerId } from '../../utils/tabAnchors'
+import { CardEmptyState } from 'app/components/CardEmptyState'
const ConsensusAccountEventsList: FC = ({ scope, address }) => {
const { t } = useTranslation()
@@ -26,9 +26,7 @@ const ConsensusAccountEventsList: FC = ({ scope,
}
if (!events?.length && isFetched) {
- return (
-
- )
+ return
}
return (
diff --git a/src/app/pages/ConsensusBlockDetailPage/ConsensusBlockEventsCard.tsx b/src/app/pages/ConsensusBlockDetailPage/ConsensusBlockEventsCard.tsx
index 80749b34f8..5ae775cfbe 100644
--- a/src/app/pages/ConsensusBlockDetailPage/ConsensusBlockEventsCard.tsx
+++ b/src/app/pages/ConsensusBlockDetailPage/ConsensusBlockEventsCard.tsx
@@ -5,10 +5,10 @@ import { AppErrors } from '../../../types/errors'
import { NUMBER_OF_ITEMS_ON_SEPARATE_PAGE as limit } from '../../config'
import { LinkableCardLayout } from '../../components/LinkableCardLayout'
import { useSearchParamsPagination } from '../../components/Table/useSearchParamsPagination'
-import { EmptyState } from '../../components/EmptyState'
import { ConsensusBlockDetailsContext } from '.'
import { ConsensusEventsList } from '../../components/ConsensusEvents/ConsensusEventsList'
import { eventsContainerId } from '../../utils/tabAnchors'
+import { CardEmptyState } from 'app/components/CardEmptyState'
const ConsensusBlockEventsList: FC = ({ scope, blockHeight }) => {
const { t } = useTranslation()
@@ -26,9 +26,7 @@ const ConsensusBlockEventsList: FC = ({ scope, blo
}
if (!events?.length && isFetched) {
- return (
-
- )
+ return
}
return (
diff --git a/src/app/pages/RuntimeBlockDetailPage/RuntimeBlockEventsCard.tsx b/src/app/pages/RuntimeBlockDetailPage/RuntimeBlockEventsCard.tsx
index a701b12353..230f1714c3 100644
--- a/src/app/pages/RuntimeBlockDetailPage/RuntimeBlockEventsCard.tsx
+++ b/src/app/pages/RuntimeBlockDetailPage/RuntimeBlockEventsCard.tsx
@@ -6,9 +6,9 @@ import { LinkableCardLayout } from '../../components/LinkableCardLayout'
import { useSearchParamsPagination } from '../../components/Table/useSearchParamsPagination'
import { AppErrors } from '../../../types/errors'
import { RuntimeEventsDetailedList } from '../../components/RuntimeEvents/RuntimeEventsDetailedList'
-import { EmptyState } from '../../components/EmptyState'
import { RuntimeBlockDetailsContext } from '.'
import { eventsContainerId } from '../../utils/tabAnchors'
+import { CardEmptyState } from 'app/components/CardEmptyState'
const EventsList: FC = ({ scope, blockHeight }) => {
const { t } = useTranslation()
@@ -31,9 +31,7 @@ const EventsList: FC = ({ scope, blockHeight }) => {
const events = data?.data.events
if (!events?.length && !isLoading) {
- return (
-
- )
+ return
}
return (