mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
24 lines
583 B
TypeScript
24 lines
583 B
TypeScript
import {createContext} from 'react';
|
|
import type {LocationDescriptor} from 'history';
|
|
|
|
type ChildTransaction = {
|
|
eventSlug: string;
|
|
id: string;
|
|
'project.name': string;
|
|
transaction: string;
|
|
};
|
|
|
|
export type SpanEntryContextChildrenProps = {
|
|
getViewChildTransactionTarget: (
|
|
props: ChildTransaction
|
|
) => LocationDescriptor | undefined;
|
|
};
|
|
|
|
const SpanEntryContext = createContext<SpanEntryContextChildrenProps>({
|
|
getViewChildTransactionTarget: () => undefined,
|
|
});
|
|
|
|
export const Provider = SpanEntryContext.Provider;
|
|
|
|
export const Consumer = SpanEntryContext.Consumer;
|