mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Chore: Avoid FC in canvas elements and dimension editors (#61014)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Libraries
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
|
||||
import { NavModelItem } from '@grafana/data';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
@@ -9,7 +9,7 @@ import { getSceneByTitle } from './scenes';
|
||||
|
||||
export interface Props extends GrafanaRouteComponentProps<{ name: string }> {}
|
||||
|
||||
export const SceneEmbeddedPage: FC<Props> = (props) => {
|
||||
export const SceneEmbeddedPage = (props: Props) => {
|
||||
const scene = getSceneByTitle(props.match.params.name, false);
|
||||
|
||||
if (!scene) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Libraries
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { useAsync } from 'react-use';
|
||||
|
||||
import { Stack } from '@grafana/experimental';
|
||||
@@ -13,7 +13,7 @@ import { getScenes } from './scenes';
|
||||
|
||||
export interface Props {}
|
||||
|
||||
export const SceneListPage: FC<Props> = ({}) => {
|
||||
export const SceneListPage = ({}: Props) => {
|
||||
const scenes = getScenes();
|
||||
const results = useAsync(() => {
|
||||
return getGrafanaSearcher().starred({ starred: true });
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Libraries
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
|
||||
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { getSceneByTitle } from './scenes';
|
||||
|
||||
export interface Props extends GrafanaRouteComponentProps<{ name: string }> {}
|
||||
|
||||
export const ScenePage: FC<Props> = (props) => {
|
||||
export const ScenePage = (props: Props) => {
|
||||
const scene = getSceneByTitle(props.match.params.name, true);
|
||||
|
||||
if (!scene) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Libraries
|
||||
import React, { FC, useEffect } from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import PageLoader from 'app/core/components/PageLoader/PageLoader';
|
||||
@@ -9,7 +9,7 @@ import { getDashboardLoader } from './DashboardsLoader';
|
||||
|
||||
export interface Props extends GrafanaRouteComponentProps<{ uid: string }> {}
|
||||
|
||||
export const DashboardScenePage: FC<Props> = ({ match }) => {
|
||||
export const DashboardScenePage = ({ match }: Props) => {
|
||||
const loader = getDashboardLoader();
|
||||
const { dashboard, isLoading } = loader.useState();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user