mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* Bump Chakra UI to v3.33.0 * disable typescript for ChakraCheckboxGroup ref prop * fix button component * change default value of SSR flag in useIsMobile hook * some screenshot updates * rollback screenshot
10 lines
589 B
TypeScript
10 lines
589 B
TypeScript
import { useBreakpointValue } from '@chakra-ui/react';
|
|
|
|
// The default behavior of useBreakpointValue was changed in the commit - https://github.com/chakra-ui/chakra-ui/commit/7f30a7b7eebae236b55fe639a202bbf354677143
|
|
// So, with ssr = true during the initial render it will return base value
|
|
// which can cause issues in some components (for example, in AdaptiveTabs while calculating tabs cut)
|
|
// Since we don't use SSR in our project, the default value should be false
|
|
export default function useIsMobile(ssr = false) {
|
|
return useBreakpointValue({ base: true, lg: false }, { ssr });
|
|
}
|