Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

493 B
Raw Blame
import { createContext, useContext } from 'solid-js';
import type { EmailThreadState } from '../primitives/email-thread-state';

const EmailThreadStateContext = createContext<EmailThreadState>();
export const EmailThreadStateProvider = EmailThreadStateContext.Provider;
export function useEmailThreadState() {
  const ctx = useContext(EmailThreadStateContext);
  if (!ctx)
    throw new Error(
      'useEmailThreadState must be used within an EmailThreadStateProvider'
    );
  return ctx;
}