diff --git a/frontend/src/Components/Page/PageTitle.tsx b/frontend/src/Components/Page/PageTitle.tsx index 4de1c91b..a251bfb5 100644 --- a/frontend/src/Components/Page/PageTitle.tsx +++ b/frontend/src/Components/Page/PageTitle.tsx @@ -1,10 +1,19 @@ +import { ReactNode } from "react" + import { H1, P } from "mkui/Components/Typography" -export function PageTitle({ description, title }: { title?: string; description?: string }) { +interface PageTitleProps { + title?: string + description?: string + children?: ReactNode +} + +export function PageTitle({ description, title, children }: PageTitleProps) { return ( <> {title ? (
+ {children ?
{children}
: null}

{title}

{description ?

{description}

: null}
diff --git a/frontend/src/Pages/Transactions/TransactionListPage.tsx b/frontend/src/Pages/Transactions/TransactionListPage.tsx index 6869b486..fdec419e 100644 --- a/frontend/src/Pages/Transactions/TransactionListPage.tsx +++ b/frontend/src/Pages/Transactions/TransactionListPage.tsx @@ -34,13 +34,6 @@ function TransactionListPageOnQuerySuccess({ const [isFiltersOpen, setIsFiltersOpen] = useState(true) const detailQuery = useTransactionsDetailQuery(selected?.id) - const paginatorProps = { - current: page, - setPage: setPage, - total: query.isSuccess ? query.data.total ?? undefined : undefined, - pages: query.isSuccess ? query.data.pages ?? undefined : undefined, - perPage: query.isSuccess ? query.data.perPage ?? undefined : undefined, - } return (
{isFiltersOpen ? ( @@ -71,13 +64,6 @@ function TransactionListPageOnQuerySuccess({ } selected={hasSelection ? selected : undefined} /> - - {(paginatorProps.total || 0) > 0 ? ( - - ) : null} - {(paginatorProps.total || 0) > 0 ? ( - - ) : null} {hasSelection ? ( @@ -103,8 +89,27 @@ export function TransactionListPage() { } }, [page, query]) + let paginator = null + if (query.isSuccess) { + const paginatorProps = { + current: page, + setPage: setPage, + total: query.isSuccess ? query.data.total ?? undefined : undefined, + pages: query.isSuccess ? query.data.pages ?? undefined : undefined, + perPage: query.isSuccess ? query.data.perPage ?? undefined : undefined, + } + + paginator = (paginatorProps.total || 0) > 0 ? : null + } + return ( - }> + + {paginator} + + } + > {(query) => ( ) } - -//title="Transactions" description="Explore transactions that went through the proxy"