routeContext.tsx 381 B

1234567891011
  1. import {createContext} from 'react';
  2. import type {RouteContextInterface} from 'sentry/types/legacyReactRouter';
  3. /**
  4. * This is a legacy context that is only used in tests currently to allow for
  5. * mocking the use{Location,Navigate,Routes,Params} hooks
  6. *
  7. * DO NOT use this outside of tests!
  8. */
  9. export const TestRouteContext = createContext<RouteContextInterface | null>(null);