mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 16:45:43 -06:00
25 lines
579 B
TypeScript
25 lines
579 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 (
|
||
|
<div style={{ height: '100%', display: 'flex', width: '100%' }}>
|
||
|
<scene.Component model={scene} />
|
||
|
</div>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default ScenePage;
|