Skip to content

Commit

Permalink
inline some of the components
Browse files Browse the repository at this point in the history
  • Loading branch information
keturiosakys committed Sep 18, 2024
1 parent accbf8c commit 339f184
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions studio/src/pages/RequestorPage/LogsTable/LogsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,21 @@ export function LogsTable({ traceId = "" }: Props) {
</Button>
</div>
</CustomTabsList>
<CustomTabsContent value="logs" className="overflow-hidden">
<LogsGrid logs={logs} />
<CustomTabsContent value="logs" className="overflow-y-scroll">
{logs.length === 0 ? (
<LogsEmptyState />
) : (
<div className="space-y-1">
{logs.map((log) => (
<LogRow key={log.id} log={log} />
))}
</div>
)}
</CustomTabsContent>
</Tabs>
);
}

type LogsGridProps = {
logs: MizuOrphanLog[];
};

function LogsGrid({ logs }: LogsGridProps) {
if (logs.length === 0) {
return <LogsEmptyState />;
}

return (
<div className="space-y-1">
{logs.map((log) => (
<LogRow key={log.id} log={log} />
))}
</div>
);
}

type LogRowProps = {
log: MizuOrphanLog;
};
Expand Down

0 comments on commit 339f184

Please sign in to comment.