mirror of
https://github.com/umami-software/umami.git
synced 2026-02-17 02:55:38 +01:00
Render children for data tables.
This commit is contained in:
parent
8bdb333716
commit
3c27f08a97
8 changed files with 45 additions and 29 deletions
|
|
@ -18,6 +18,10 @@ export function WebsitesDataTable({
|
|||
}) {
|
||||
const queryResult = useWebsites({ teamId });
|
||||
|
||||
if (!queryResult?.result?.data?.length) {
|
||||
return children;
|
||||
}
|
||||
|
||||
return (
|
||||
<DataTable queryResult={queryResult}>
|
||||
{({ data }) => (
|
||||
|
|
@ -27,9 +31,7 @@ export function WebsitesDataTable({
|
|||
showActions={showActions}
|
||||
allowEdit={allowEdit}
|
||||
allowView={allowView}
|
||||
>
|
||||
{children}
|
||||
</WebsitesTable>
|
||||
/>
|
||||
)}
|
||||
</DataTable>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue