Files
supabase/apps/studio/components/interfaces/Settings/Logs/LogColumnRenderers/FunctionsEdgeColumnRender.tsx
T
Jordi EnricandJoshen Lim ed69371b76 Update TimestampInfo to accept a UTC timestamp by default (#31167)
* add isUTC support in TimestampInfo

* rm isutc

* rename value prop to utcTimestamp

* Fixy

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-12-18 12:10:56 +08:00

28 lines
908 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 utcTimestamp={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