@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
tsx 16 lines 530 Bytes
Raw
1 import { createContext, type ReactNode } from "react";
2
3 import { useAppActive } from "../lib/appState";
4
5 export const ThreadPrDemandContext = createContext(true);
6
7 export function ThreadPrDemandProvider(props: {
8 readonly visible: boolean;
9 readonly children: ReactNode;
10 }) {
11 const active = useAppActive();
12 // A sidebar can stay visible beside a focused detail route, so route focus cannot gate its reads.
13 return (
14 <ThreadPrDemandContext value={props.visible && active}>{props.children}</ThreadPrDemandContext>
15 );
16 }