From 86022c7f86ab2e3b24e8eff87b9cf8ff655d750f Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 26 Dec 2024 13:22:36 +0100 Subject: [PATCH] avoid some react warnings --- viewer/components/CenterDisplayWidget.jsx | 6 ++---- viewer/components/UserAppDialog.jsx | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/viewer/components/CenterDisplayWidget.jsx b/viewer/components/CenterDisplayWidget.jsx index ca85669b..86b06fb0 100644 --- a/viewer/components/CenterDisplayWidget.jsx +++ b/viewer/components/CenterDisplayWidget.jsx @@ -9,7 +9,7 @@ import Formatter from '../util/formatter.js'; import {useKeyEventHandler} from '../util/GuiHelpers.js'; import NavCompute from "../nav/navcompute"; import {useAvNavSortable} from "../hoc/Sortable"; -import {WidgetFrame, WidgetHead} from "./WidgetBase"; +import {WidgetFrame, WidgetHead, WidgetProps} from "./WidgetBase"; const CenterDisplayWidget = (props) => { @@ -83,8 +83,7 @@ CenterDisplayWidget.storeKeys={ }; CenterDisplayWidget.propTypes={ - onClick: PropTypes.func, - className: PropTypes.string, + ...WidgetProps, markerCourse:PropTypes.number, markerDistance:PropTypes.number, centerCourse:PropTypes.number, @@ -92,7 +91,6 @@ CenterDisplayWidget.propTypes={ centerPosition: PropTypes.object, measurePosition: PropTypes.object, measureRhumbLine: PropTypes.bool, - dragId: PropTypes.string, style: PropTypes.object, mode: PropTypes.string }; diff --git a/viewer/components/UserAppDialog.jsx b/viewer/components/UserAppDialog.jsx index 897a622c..a8bc634c 100644 --- a/viewer/components/UserAppDialog.jsx +++ b/viewer/components/UserAppDialog.jsx @@ -53,7 +53,7 @@ const ItemNameDialog=({iname,resolveFunction,fixedExt,title,mandatory,checkName} }; ItemNameDialog.propTypes={ - iname: PropTypes.oneOfType([PropTypes.string,undefined]), + iname: PropTypes.string, resolveFunction: PropTypes.func, //must return true to close the dialog checkName: PropTypes.func, //if provided: return an error text if the name is invalid title: PropTypes.func, //use this as dialog title