(Router: RouterType)
| 160 | * A higher-order component to instrument Solid Router to create navigation spans. |
| 161 | */ |
| 162 | export function withSentryRouterRouting(Router: RouterType): RouterType { |
| 163 | const SentryRouter = (props: Parameters<RouterType>[0]): JSX.Element => { |
| 164 | const [local, others] = splitProps(props, ['root']); |
| 165 | // We need to wrap root here in case the user passed in their own root |
| 166 | const Root = withSentryRouterRoot(local.root ? local.root : SentryDefaultRoot); |
| 167 | |
| 168 | return createComponent(Router, mergeProps({ root: Root }, others)); |
| 169 | }; |
| 170 | |
| 171 | return SentryRouter; |
| 172 | } |
no outgoing calls
no test coverage detected