import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks"; import { last } from "@applicaster/zapp-react-native-utils/utils"; import { toBooleanWithDefaultFalse } from "@applicaster/zapp-react-native-utils/booleanUtils"; export const useCurrentScreenIsHook = (): boolean => { const { mainStack = [] } = useNavigation(); return toBooleanWithDefaultFalse(last(mainStack)?.route?.includes("hook")); };