Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

611 B
Raw Blame
import { createContext, useContext, useEffect, useId } from 'react'
import type { LayoutChangeEvent } from 'react-native'

type ReportDetail = (detailId: string, height: number | null) => void

export const MobileNativeChatOpenedDetailContext = createContext<ReportDetail | null>(null)

export function useMobileNativeChatOpenedDetail(): (event: LayoutChangeEvent) => void {
  const report = useContext(MobileNativeChatOpenedDetailContext)
  const detailId = useId()
  useEffect(() => () => report?.(detailId, null), [detailId, report])
  return (event) => report?.(detailId, event.nativeEvent.layout.height)
}