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 @@
|
||||
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} />
|
||||
|
||||
Reference in New Issue
Block a user