File tree Expand file tree Collapse file tree
src/ui/components/pages/Channels/ChannelCard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
22import { Box , Link , Tooltip } from '@mui/material' ;
33import { Channel } from 'types' ;
44import NotificationsOffIcon from '@mui/icons-material/NotificationsOff' ;
5+ import FilterAltIcon from '@mui/icons-material/FilterAlt' ;
56
67interface ChannelTitleProps {
78 channel : Channel ;
@@ -15,7 +16,7 @@ function ChannelTitle(props: ChannelTitleProps) {
1516 sx = { {
1617 display : 'flex' ,
1718 alignItems : 'center' ,
18- gap : 2 ,
19+ gap : 1 ,
1920 } }
2021 >
2122 < Link
@@ -34,6 +35,11 @@ function ChannelTitle(props: ChannelTitleProps) {
3435 < NotificationsOffIcon color = "disabled" fontSize = "small" />
3536 </ Tooltip >
3637 ) }
38+ { ! ! channel . filters ?. length && (
39+ < Tooltip title = "Has filters" >
40+ < FilterAltIcon color = "disabled" fontSize = "small" />
41+ </ Tooltip >
42+ ) }
3743 </ Box >
3844 ) ;
3945}
@@ -46,7 +52,8 @@ function propsAreEqual(
4652 prevProps . channel . title === nextProps . channel . title &&
4753 prevProps . channel . url === nextProps . channel . url &&
4854 prevProps . channel . notifications ?. isDisabled ===
49- nextProps . channel . notifications ?. isDisabled
55+ nextProps . channel . notifications ?. isDisabled &&
56+ prevProps . channel . filters ?. length === nextProps . channel . filters ?. length
5057 ) ;
5158}
5259
You can’t perform that action at this time.
0 commit comments