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.

601 B
Raw Blame
import { createContext, useCallback, useContext } from 'react'
import { useFocusEffect } from 'expo-router'

export const HostAreaServingContext = createContext<(serving: boolean) => void>(() => {})

// Report only while focused so pushing or popping another screen returns area ownership to the host layout.
export function useReportedHostAreaServing(serving: boolean): void {
  const report = useContext(HostAreaServingContext)
  useFocusEffect(
    useCallback(() => {
      if (!serving) {
        return
      }
      report(true)
      return () => report(false)
    }, [report, serving])
  )
}