Files
supabase/apps/studio/components/interfaces/Settings/Logs/LogColumnRenderers/FunctionsEdgeColumnRender.tsx
T
Ivan Vasilov 09a62662d8 chore: Clean up ui-patterns imports (#29132)
* 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.
2024-09-30 21:41:26 +02:00

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