ghost-telemetry-frontend/src/components/List/Column/LinuxKernelColumn.tsx
Uncle Fatso e63dad2106
initial commit for public repo
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
2024-12-23 15:01:54 +03:00

27 lines
785 B
TypeScript

import * as React from 'react';
import { ColumnProps } from './';
import { Node } from '../../../state';
import icon from '../../../icons/file-binary.svg';
export class LinuxKernelColumn extends React.Component<ColumnProps> {
public static readonly label = 'Linux Kernel';
public static readonly icon = icon;
public static readonly width = 154;
public static readonly setting = 'linux_kernel';
public static readonly sortBy = ({ linux_kernel }: Node) => linux_kernel || 0;
private data: string;
public shouldComponentUpdate(nextProps: ColumnProps) {
return this.data !== nextProps.node.linux_kernel;
}
render() {
const { linux_kernel } = this.props.node;
this.data = linux_kernel;
return <td className="Column">{linux_kernel || '-'}</td>;
}
}