mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Avoid explicit React.FC<Props> when possible (round 2) (#64749)
This commit is contained in:
@@ -41,7 +41,7 @@ type LinkSettingsEditProps = {
|
||||
onGoBack: () => void;
|
||||
};
|
||||
|
||||
export const LinkSettingsEdit: React.FC<LinkSettingsEditProps> = ({ editLinkIdx, dashboard, onGoBack }) => {
|
||||
export const LinkSettingsEdit = ({ editLinkIdx, dashboard, onGoBack }: LinkSettingsEditProps) => {
|
||||
const [linkSettings, setLinkSettings] = useState(editLinkIdx !== null ? dashboard.links[editLinkIdx] : newLink);
|
||||
|
||||
const onUpdate = (link: DashboardLink) => {
|
||||
|
||||
@@ -13,7 +13,7 @@ type LinkSettingsListProps = {
|
||||
onEdit: (idx: number) => void;
|
||||
};
|
||||
|
||||
export const LinkSettingsList: React.FC<LinkSettingsListProps> = ({ dashboard, onNew, onEdit }) => {
|
||||
export const LinkSettingsList = ({ dashboard, onNew, onEdit }: LinkSettingsListProps) => {
|
||||
const [links, setLinks] = useState(dashboard.links);
|
||||
|
||||
const moveLink = (idx: number, direction: number) => {
|
||||
|
||||
Reference in New Issue
Block a user