mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 23:59:08 +03:00
* chore: cleanup packages - Avoid circular imports - Export API-types as types - pg-format without depending on Node internal Buffer (not browser-compatible) - Avoid importing from barrel files in ui dir * chore: avoid barrel file imports in studio (#27771) * chore: avoid barrel file imports - Removes some unused imports - Avoids barrel file import for faster builds + less memory * add eslint rule * type fixes * delete layouts barrel * delete components/grid barrel file * delete components/grid/utils barrel file * delete components/grid/components/common barrel file * delete components/grid/components/editor barrel file * delete components/grid/components/formatter barrel file * delete components/grid/components/grid barrel file * delete components/grid/components/header/filter barrel file * remote components/grid/store barrel file * remove components/interfaces/Auth/Policies barrel file * delete components/interfaces/Settings/Logs barrel file * delete components/ui/CodeEditor barrel file * delete components/ui/Forms barrel file * delete components/ui/Shimmers barrel file * delete data/analytics barrel file * delete hooks barrel file * cleanup lib/common/fetch barrel file * final * barral files cleanup * global react-data-grid styles * remove console.log --------- Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com> * fix build --------- Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import { cn, CodeBlock } from 'ui'
|
|
import type { PreviewLogData } from '../Logs.types'
|
|
import { SelectionDetailedTimestampRow } from '../LogsFormatters'
|
|
|
|
const DefaultPreviewSelectionRenderer = ({ log }: { log: PreviewLogData }) => (
|
|
<div className={`space-y-6 py-4 px-5`}>
|
|
{log?.timestamp && <SelectionDetailedTimestampRow value={log.timestamp} />}
|
|
<div className="flex flex-col gap-3">
|
|
<h3 className="text-foreground-lighter text-sm">Event Message</h3>
|
|
{log?.event_message && (
|
|
<CodeBlock
|
|
className="prose dark:prose-dark max-w-full"
|
|
hideLineNumbers
|
|
value={JSON.stringify(log?.event_message)}
|
|
/>
|
|
)}
|
|
</div>
|
|
<div className="flex flex-col gap-3">
|
|
<h3 className="text-foreground-lighter text-sm">Metadata</h3>
|
|
<CodeBlock
|
|
hideLineNumbers
|
|
value={JSON.stringify(log?.metadata, null, 2) || ''}
|
|
language="json"
|
|
className={cn(
|
|
'max-w-full',
|
|
'!py-3 !px-3.5 prose dark:prose-dark transition',
|
|
'[&>code]:m-0 [&>code>span]:flex [&>code>span]:flex-wrap'
|
|
)}
|
|
/>
|
|
</div>
|
|
</div>
|
|
)
|
|
|
|
export default DefaultPreviewSelectionRenderer
|