Skip to content

Commit

Permalink
fix desktop entry header shortly rendered as mobile, causing a small …
Browse files Browse the repository at this point in the history
…visual glitch
  • Loading branch information
Athou committed Aug 16, 2023
1 parent f16bac9 commit c2e4530
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion commafeed-client/src/hooks/useMobile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { useMediaQuery } from "@mantine/hooks"
import { Constants } from "app/constants"

export const useMobile = (breakpoint: string = Constants.layout.mobileBreakpoint) => !useMediaQuery(`(min-width: ${breakpoint})`)
export const useMobile = (breakpoint: string = Constants.layout.mobileBreakpoint) =>
!useMediaQuery(`(min-width: ${breakpoint})`, undefined, {
getInitialValueInEffect: false,
})

0 comments on commit c2e4530

Please sign in to comment.