Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

v5-workspace-context.tsx

17 lines723 Bytes

1import { createContext, type ReactNode } from "react";
2​
3export const NativeWorkspaceModeContext = createContext(false);
4/** Retained tabs must not update another tab's navigation options. */
5export const NativeWorkspaceTabActivityContext = createContext<{
6 readonly active: boolean;
7 readonly isActive: () => boolean;
8} | null>(null);
9export const NativePrimaryColumnContext = createContext<{
10 readonly presented: boolean;
11 readonly selectedThreadKey: string | null;
12 readonly selectedPullRequestKey: string | null;
13} | null>(null);
14export const NativeWorkspaceInspectorContext = createContext<{
15 readonly render: (() => ReactNode) | undefined;
16 readonly visible: boolean;
17}>({ render: undefined, visible: false });