Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

538 B
Raw Blame
import type { ComponentType } from 'react';
import { Route } from 'react-router-dom';

/**
 * A page that reads its params out of the pathname renders under its own route
 * rather than being mounted bare. Stories declare the pattern here instead of
 * mounting a router `<Route>` themselves.
 */
export const renderAtRoute = (
	path: string | string[],
	Component: ComponentType,
): (() => JSX.Element) => {
	function StoryAtRoute(): JSX.Element {
		return <Route exact path={path} component={Component} />;
	}

	return StoryAtRoute;
};