Chore: change variable names and use classnames

This commit is contained in:
csrapr 2021-02-18 14:57:42 +00:00 committed by Josh Harvey
parent f752bad447
commit 6760c39e29
4 changed files with 17 additions and 18 deletions

View file

@ -55,10 +55,9 @@ const CLEAR_ALL_NOTIFICATIONS = gql`
const NotificationCenter = ({
close,
hasUnreadProp,
notifButtonCoords,
buttonCoords,
popperRef,
refetchHasUnreadHeader,
setHeaderHasUnread
refetchHasUnreadHeader
}) => {
const { data, loading } = useQuery(GET_NOTIFICATIONS, {
pollInterval: 60000
@ -68,12 +67,11 @@ const NotificationCenter = ({
const [showingUnread, setShowingUnread] = useState(false)
const classes = useStyles({ notifButtonCoords, xOffset })
const classes = useStyles({ buttonCoords, xOffset })
const machines = R.compose(
R.map(R.prop('name')),
R.indexBy(R.prop('deviceId'))
)(data?.machines ?? [])
const notifications = R.path(['notifications'])(data) ?? []
const [hasUnread, setHasUnread] = useState(
hasUnreadProp || (data?.hasUnreadNotifications ?? false)