chore: fix initial value for count bubble
This commit is contained in:
@@ -12,9 +12,11 @@ export const NavigationMenuButton = () => {
|
|||||||
const { setPaneLayout } = useResponsiveAppPane()
|
const { setPaneLayout } = useResponsiveAppPane()
|
||||||
const { isTabletOrMobile, isMobile } = useIsTabletOrMobileScreen()
|
const { isTabletOrMobile, isMobile } = useIsTabletOrMobileScreen()
|
||||||
|
|
||||||
const [bubbleCount, setBubbleCount] = useState<string | undefined>(() =>
|
const [bubbleCount, setBubbleCount] = useState<string | undefined>(() => {
|
||||||
application.status.totalPreferencesBubbleCount.toString(),
|
return application.status.totalPreferencesBubbleCount
|
||||||
)
|
? application.status.totalPreferencesBubbleCount.toString()
|
||||||
|
: undefined
|
||||||
|
})
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return application.status.addEventObserver((event, message) => {
|
return application.status.addEventObserver((event, message) => {
|
||||||
if (event !== StatusServiceEvent.PreferencesBubbleCountChanged) {
|
if (event !== StatusServiceEvent.PreferencesBubbleCountChanged) {
|
||||||
|
|||||||
Reference in New Issue
Block a user