Open-source and local-first Slack and Notion alternative that puts you in control of your data
TypeScript chatchat-applicationcrdteditorelectronknowledge-baselocal-firstnotionnotion-alternativerealtime-collaborationself-hostedslacksqliteteam-collaborationwikiyjs
import { createContext, useContext } from 'react';
export type ContainerType = 'full' | 'modal';
interface ContainerContext {
type: ContainerType;
scrollAreaRef: React.RefObject<HTMLDivElement>;
scrollViewportRef: React.RefObject<HTMLDivElement>;
}
export const ContainerContext = createContext<ContainerContext>(
{} as ContainerContext
);
export const useContainer = () => useContext(ContainerContext);