import * as React from "react";
import { Table, TableHead, TableCell, TableRow, TableBody, StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core';
+import { navigateTo } from "~/store/navigation/navigation-action";
type CssRules = 'cell';
uuid: string;
linkClass: string;
name: string;
- tail: string;
- head: string;
+ tailUuid: string;
+ headUuid: string;
properties: any;
}
items: MetadataTable[];
}
-
export const MetadataTab = withStyles(styles)((props: MetadataProps & WithStyles<CssRules>) =>
<Table>
<TableHead>
</TableRow>
</TableHead>
<TableBody>
- {props.items.map((it: any, index: number) => {
+ {props.items.map((it: MetadataTable, index: number) => {
return (
<TableRow key={index}>
- {tableCell(it.uuid, props.classes)}
- {tableCell(it.linkClass, props.classes)}
- {tableCell(it.name, props.classes)}
- {tableCell(it.tailUuid, props.classes)}
- {tableCell(it.headUuid, props.classes)}
- {tableCell(JSON.stringify(it.properties, null, 2), props.classes)}
+ <TableCell className={props.classes.cell}>{it.uuid}</TableCell>
+ <TableCell className={props.classes.cell}>{it.linkClass}</TableCell>
+ <TableCell className={props.classes.cell}>{it.name}</TableCell>
+ <TableCell className={props.classes.cell}>{it.tailUuid}</TableCell>
+ <TableCell className={props.classes.cell}>{it.headUuid}</TableCell>
+ <TableCell className={props.classes.cell}>{JSON.stringify(it.properties, null, 2)}</TableCell>
</TableRow>
);
})}
</TableBody>
</Table>
-);
-
-const tableCell = (value: string, classes: any) =>
- <TableCell className={classes.cell}>{value}</TableCell>;
\ No newline at end of file
+);
\ No newline at end of file