[Hotfix] Fix lint mistake accidentally pushed to master (#9077)

Co-authored-by: Max Fitton <max@semprehealth.com>
This commit is contained in:
Max Fitton 2020-06-21 19:19:07 -07:00 committed by GitHub
parent acdd873481
commit 1d5c123c81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 21 deletions

View file

@ -369,7 +369,7 @@ export type MemoryTableGroups = {
export type MemoryTableGroup = {
entries: MemoryTableEntry[];
summary: MemoryTableSummary;
}
};
export type MemoryTableResponse = {
group: MemoryTableGroups;

View file

@ -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}
/>
);
});
};

View file

@ -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);