mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 21:29:08 +03:00
* Switch all top-level imports for ui-patterns components to use specific components when importing. * Remove the @ui-patterns shorthand since it works exactly the same without the @. * More import fixes. * Fix the ui-patterns tests.
28 lines
901 B
TypeScript
28 lines
901 B
TypeScript
import { Column } from 'react-data-grid'
|
|
import type { LogData } from '../Logs.types'
|
|
import { ResponseCodeFormatter, RowLayout, TextFormatter } from '../LogsFormatters'
|
|
import { defaultRenderCell } from './DefaultPreviewColumnRenderer'
|
|
import { TimestampInfo } from 'ui-patterns/TimestampInfo'
|
|
|
|
const columns: Column<LogData>[] = [
|
|
{
|
|
name: 'functions-edge-first-column',
|
|
key: 'functions-edge-first-column',
|
|
renderCell: (props) => {
|
|
if (!props.row.status_code && !props.row.method) {
|
|
return defaultRenderCell(props)
|
|
}
|
|
return (
|
|
<RowLayout>
|
|
<TimestampInfo value={props.row.timestamp!} />
|
|
<ResponseCodeFormatter row={props} value={props.row.status_code} />
|
|
<TextFormatter value={props.row.method as string} />
|
|
<TextFormatter value={props.row.id} />
|
|
</RowLayout>
|
|
)
|
|
},
|
|
},
|
|
]
|
|
|
|
export default columns
|