Fix Table component build
This commit is contained in:
parent
ba6ed81edb
commit
35665e7c79
1 changed files with 6 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
import React, { FC, useMemo } from 'react';
|
||||
import { compose, keys, map } from 'ramda';
|
||||
import { keys, map } from 'ramda';
|
||||
import clsx from 'clsx';
|
||||
|
||||
import { isNilOrEmpty } from '@procyon/utils';
|
||||
|
@ -20,14 +20,11 @@ export type TableProps = {
|
|||
export const Table: FC<TableProps> = ({ cols, rows, nthStyle = true, className }) => {
|
||||
const headCells = useMemo(() => {
|
||||
if (!isNilOrEmpty(cols?.data)) {
|
||||
return compose(
|
||||
map((c) => (
|
||||
Object.keys(cols.data).map((c) => (
|
||||
<TableHead key={c} className={cols.className}>
|
||||
{cols.data[c].value}
|
||||
</TableHead>
|
||||
)),
|
||||
keys
|
||||
)(cols.data);
|
||||
))
|
||||
}
|
||||
return null;
|
||||
}, [cols.data]);
|
||||
|
|
Loading…
Add table
Reference in a new issue