Refactor LogLevelCell
This commit is contained in:
@@ -4,10 +4,11 @@ import React, { type FC } from 'react';
|
||||
import { ActivityLogEntryCell } from '../types/ActivityLogEntryCell';
|
||||
import LogLevelChip from './LogLevelChip';
|
||||
|
||||
const LogLevelCell: FC<ActivityLogEntryCell> = ({ cell }) => (
|
||||
cell.getValue<LogLevel | undefined>() ? (
|
||||
<LogLevelChip level={cell.getValue<LogLevel>()} />
|
||||
) : undefined
|
||||
);
|
||||
const LogLevelCell: FC<ActivityLogEntryCell> = ({ cell }) => {
|
||||
const level = cell.getValue<LogLevel | undefined>();
|
||||
return level ? (
|
||||
<LogLevelChip level={level} />
|
||||
) : undefined;
|
||||
};
|
||||
|
||||
export default LogLevelCell;
|
||||
|
||||
Reference in New Issue
Block a user