import {createContext, useContext, useMemo} from 'react'; type Props = { children: React.ReactNode; eventId?: string; groupId?: string; }; type BreadcrumbCustomizationContextType = Omit; const ReplayGroupContext = createContext({}); /** * Used when rendering a replay within the context of a group. * Provides event and group IDs which customize the breadcrumb items * to highlight the current event and group. */ export function ReplayGroupContextProvider({children, groupId, eventId}: Props) { const value = useMemo(() => ({groupId, eventId}), [groupId, eventId]); return ( {children} ); } export const useReplayGroupContext = () => useContext(ReplayGroupContext);