mirror of
https://github.com/vale981/ray
synced 2025-03-08 19:41:38 -05:00
[Hotfix] Fix lint mistake accidentally pushed to master (#9077)
Co-authored-by: Max Fitton <max@semprehealth.com>
This commit is contained in:
parent
acdd873481
commit
1d5c123c81
3 changed files with 25 additions and 21 deletions
|
@ -369,7 +369,7 @@ export type MemoryTableGroups = {
|
||||||
export type MemoryTableGroup = {
|
export type MemoryTableGroup = {
|
||||||
entries: MemoryTableEntry[];
|
entries: MemoryTableEntry[];
|
||||||
summary: MemoryTableSummary;
|
summary: MemoryTableSummary;
|
||||||
}
|
};
|
||||||
|
|
||||||
export type MemoryTableResponse = {
|
export type MemoryTableResponse = {
|
||||||
group: MemoryTableGroups;
|
group: MemoryTableGroups;
|
||||||
|
|
|
@ -25,19 +25,25 @@ import { StoreState } from "../../../store";
|
||||||
import MemoryRowGroup from "./MemoryRowGroup";
|
import MemoryRowGroup from "./MemoryRowGroup";
|
||||||
import { MemoryTableRow } from "./MemoryTableRow";
|
import { MemoryTableRow } from "./MemoryTableRow";
|
||||||
|
|
||||||
const makeGroupedEntries = (memoryTableGroups: MemoryTableGroups, order: Order, orderBy: keyof MemoryTableEntry | null) => {
|
const makeGroupedEntries = (
|
||||||
|
memoryTableGroups: MemoryTableGroups,
|
||||||
|
order: Order,
|
||||||
|
orderBy: keyof MemoryTableEntry | null,
|
||||||
|
) => {
|
||||||
const comparator = orderBy && getComparator(order, orderBy);
|
const comparator = orderBy && getComparator(order, orderBy);
|
||||||
return Object.entries(memoryTableGroups).map(([groupKey, group]) => {
|
return Object.entries(memoryTableGroups).map(([groupKey, group]) => {
|
||||||
const sortedEntries = comparator
|
const sortedEntries = comparator
|
||||||
? stableSort(group.entries, comparator)
|
? stableSort(group.entries, comparator)
|
||||||
: group.entries;
|
: group.entries;
|
||||||
|
|
||||||
return <MemoryRowGroup
|
return (
|
||||||
|
<MemoryRowGroup
|
||||||
groupKey={groupKey}
|
groupKey={groupKey}
|
||||||
summary={group.summary}
|
summary={group.summary}
|
||||||
entries={sortedEntries}
|
entries={sortedEntries}
|
||||||
initialExpanded={true}
|
initialExpanded={true}
|
||||||
/>
|
/>
|
||||||
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
import {
|
import { createStyles, makeStyles, TableRow, Theme } from "@material-ui/core";
|
||||||
createStyles,
|
|
||||||
TableRow,
|
|
||||||
Theme,
|
|
||||||
makeStyles
|
|
||||||
} from "@material-ui/core";
|
|
||||||
import AddIcon from "@material-ui/icons/Add";
|
import AddIcon from "@material-ui/icons/Add";
|
||||||
import RemoveIcon from "@material-ui/icons/Remove";
|
import RemoveIcon from "@material-ui/icons/Remove";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import {
|
import { MemoryTableEntry, MemoryTableSummary } from "../../../api";
|
||||||
MemoryTableEntry,
|
|
||||||
MemoryTableSummary,
|
|
||||||
} from "../../../api";
|
|
||||||
import {
|
import {
|
||||||
ExpandableStyledTableCell,
|
ExpandableStyledTableCell,
|
||||||
StyledTableCell,
|
StyledTableCell,
|
||||||
|
@ -32,7 +24,8 @@ const useMemoryRowGroupStyles = makeStyles((theme: Theme) =>
|
||||||
fontFamily: "SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace",
|
fontFamily: "SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace",
|
||||||
whiteSpace: "pre",
|
whiteSpace: "pre",
|
||||||
},
|
},
|
||||||
}));
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
type MemoryRowGroupProps = {
|
type MemoryRowGroupProps = {
|
||||||
groupKey: string;
|
groupKey: string;
|
||||||
|
@ -41,7 +34,12 @@ type MemoryRowGroupProps = {
|
||||||
initialExpanded: boolean;
|
initialExpanded: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const MemoryRowGroup: React.FC<MemoryRowGroupProps> = ({ groupKey, entries, summary, initialExpanded}) => {
|
const MemoryRowGroup: React.FC<MemoryRowGroupProps> = ({
|
||||||
|
groupKey,
|
||||||
|
entries,
|
||||||
|
summary,
|
||||||
|
initialExpanded,
|
||||||
|
}) => {
|
||||||
const classes = useMemoryRowGroupStyles();
|
const classes = useMemoryRowGroupStyles();
|
||||||
const [expanded, setExpanded] = useState(initialExpanded);
|
const [expanded, setExpanded] = useState(initialExpanded);
|
||||||
const toggleExpanded = () => setExpanded(!expanded);
|
const toggleExpanded = () => setExpanded(!expanded);
|
||||||
|
|
Loading…
Add table
Reference in a new issue