mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -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 = {
|
||||
entries: MemoryTableEntry[];
|
||||
summary: MemoryTableSummary;
|
||||
}
|
||||
};
|
||||
|
||||
export type MemoryTableResponse = {
|
||||
group: MemoryTableGroups;
|
||||
|
|
|
@ -25,19 +25,25 @@ import { StoreState } from "../../../store";
|
|||
import MemoryRowGroup from "./MemoryRowGroup";
|
||||
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);
|
||||
return Object.entries(memoryTableGroups).map(([groupKey, group]) => {
|
||||
const sortedEntries = comparator
|
||||
? stableSort(group.entries, comparator)
|
||||
: group.entries;
|
||||
|
||||
return <MemoryRowGroup
|
||||
groupKey={groupKey}
|
||||
summary={group.summary}
|
||||
entries={sortedEntries}
|
||||
initialExpanded={true}
|
||||
/>
|
||||
|
||||
return (
|
||||
<MemoryRowGroup
|
||||
groupKey={groupKey}
|
||||
summary={group.summary}
|
||||
entries={sortedEntries}
|
||||
initialExpanded={true}
|
||||
/>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -1,16 +1,8 @@
|
|||
import {
|
||||
createStyles,
|
||||
TableRow,
|
||||
Theme,
|
||||
makeStyles
|
||||
} from "@material-ui/core";
|
||||
import { createStyles, makeStyles, TableRow, Theme } from "@material-ui/core";
|
||||
import AddIcon from "@material-ui/icons/Add";
|
||||
import RemoveIcon from "@material-ui/icons/Remove";
|
||||
import React, { useState } from "react";
|
||||
import {
|
||||
MemoryTableEntry,
|
||||
MemoryTableSummary,
|
||||
} from "../../../api";
|
||||
import { MemoryTableEntry, MemoryTableSummary } from "../../../api";
|
||||
import {
|
||||
ExpandableStyledTableCell,
|
||||
StyledTableCell,
|
||||
|
@ -32,7 +24,8 @@ const useMemoryRowGroupStyles = makeStyles((theme: Theme) =>
|
|||
fontFamily: "SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace",
|
||||
whiteSpace: "pre",
|
||||
},
|
||||
}));
|
||||
}),
|
||||
);
|
||||
|
||||
type MemoryRowGroupProps = {
|
||||
groupKey: string;
|
||||
|
@ -41,7 +34,12 @@ type MemoryRowGroupProps = {
|
|||
initialExpanded: boolean;
|
||||
};
|
||||
|
||||
const MemoryRowGroup: React.FC<MemoryRowGroupProps> = ({ groupKey, entries, summary, initialExpanded}) => {
|
||||
const MemoryRowGroup: React.FC<MemoryRowGroupProps> = ({
|
||||
groupKey,
|
||||
entries,
|
||||
summary,
|
||||
initialExpanded,
|
||||
}) => {
|
||||
const classes = useMemoryRowGroupStyles();
|
||||
const [expanded, setExpanded] = useState(initialExpanded);
|
||||
const toggleExpanded = () => setExpanded(!expanded);
|
||||
|
|
Loading…
Add table
Reference in a new issue