Chore: Avoid FC in canvas elements and dimension editors (#61014)

This commit is contained in:
Ryan McKinley
2023-01-05 09:55:55 -08:00
committed by GitHub
parent bd90a6e1be
commit 48fbe51d37
31 changed files with 85 additions and 103 deletions
@@ -1,5 +1,5 @@
import { css } from '@emotion/css';
import React, { FC, memo } from 'react';
import React, { memo } from 'react';
import { useAsync } from 'react-use';
import { locationUtil, NavModelItem } from '@grafana/data';
@@ -19,7 +19,7 @@ export interface DashboardListPageRouteParams {
interface Props extends GrafanaRouteComponentProps<DashboardListPageRouteParams> {}
export const DashboardListPage: FC<Props> = memo(({ match, location }) => {
export const DashboardListPage = memo(({ match, location }: Props) => {
const { loading, value } = useAsync<() => Promise<{ folder?: FolderDTO; pageNav?: NavModelItem }>>(() => {
const uid = match.params.uid;
const url = location.pathname;
@@ -1,4 +1,4 @@
import React, { FC, memo } from 'react';
import React, { memo } from 'react';
import { Checkbox } from '@grafana/ui';
@@ -10,8 +10,8 @@ interface Props {
'aria-label'?: string;
}
export const SearchCheckbox: FC<Props> = memo(
({ onClick, className, checked = false, editable = false, 'aria-label': ariaLabel }) => {
export const SearchCheckbox = memo(
({ onClick, className, checked = false, editable = false, 'aria-label': ariaLabel }: Props) => {
return editable ? (
<div onClick={onClick} className={className}>
<Checkbox value={checked} aria-label={ariaLabel} />