mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
* Scenes: Support new top nav * Page: Make Page component support new and old dashboard page layouts * Pass scrollbar props * Fixing flex layout for dashboard * Updated title handling and test
21 lines
487 B
TypeScript
21 lines
487 B
TypeScript
// Libraries
|
|
import React, { FC } from 'react';
|
|
|
|
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
|
|
|
|
import { getSceneByTitle } from './scenes';
|
|
|
|
export interface Props extends GrafanaRouteComponentProps<{ name: string }> {}
|
|
|
|
export const ScenePage: FC<Props> = (props) => {
|
|
const scene = getSceneByTitle(props.match.params.name);
|
|
|
|
if (!scene) {
|
|
return <h2>Scene not found</h2>;
|
|
}
|
|
|
|
return <scene.Component model={scene} />;
|
|
};
|
|
|
|
export default ScenePage;
|