Skip to content

Commit c1b76ce

Browse files
dctalbotmastercactapus
authored andcommitted
fix active oncall highlighting
1 parent 93b908a commit c1b76ce

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

web/src/app/lists/FlatList.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const useStyles = makeStyles({
4242
},
4343
background: { backgroundColor: 'white' },
4444
highlightedItem: {
45-
width: '100%',
4645
borderLeft: '6px solid ' + lime,
4746
background: lightLime,
4847
},
@@ -235,13 +234,6 @@ export default function FlatList({
235234
}
236235

237236
function renderItem(item: FlatListItem, idx: number): JSX.Element {
238-
let itemClass = ''
239-
if (!item.highlight) {
240-
itemClass = classes.listItem
241-
}
242-
if (item.disabled) {
243-
itemClass = classes.listItemDisabled
244-
}
245237
let itemProps = {}
246238
if (item.url) {
247239
itemProps = {
@@ -256,7 +248,11 @@ export default function FlatList({
256248
scrollIntoView={item.scrollIntoView}
257249
key={idx}
258250
{...itemProps}
259-
className={itemClass}
251+
className={classnames({
252+
[classes.listItem]: true,
253+
[classes.highlightedItem]: item.highlight,
254+
[classes.listItemDisabled]: item.disabled,
255+
})}
260256
>
261257
{item.icon && <ListItemIcon>{item.icon}</ListItemIcon>}
262258
<ListItemText

0 commit comments

Comments
 (0)