Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix return type declarations #317

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Acknowledgements } from "@components/acknowledgements";
/**
* renders the main content
*
* @returns JSX.Element
* @returns React.ReactElement
* @constructor
*/
const Content = () => {
Expand Down Expand Up @@ -51,7 +51,7 @@ const Content = () => {
/**
* renders the application
*
* @returns JSX.Element
* @returns React.ReactElement
* @constructor
*/
export const App = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/compare-panel/compare-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Draggable from "react-draggable";
/**
* renders the compare mode selections.
*
* @returns JSX.Element
* @returns React.ReactElement
* @constructor
*/
export const ComparePanel = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const getDefaultInstanceName = () => {
/**
* handles getting the default instance name
*
* @returns JSX.Element
* @returns React.ReactElement
* @constructor
*/
export const Config = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialog/base-floating-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ BaseFloatingDialog.propTypes = {
*
* @param title - the name of the dialog: string
* @param index - the index of the data
* @param dialogObject the object to render in the dialog: {JSX.Element}
* @param dialogObject the object to render in the dialog: React.ReactElement
* @param dataKey - the key to the data list elements in state: string
* @param dataList - a data list in state: array
* @param setDataList - method to update a data list in state: function
Expand Down
4 changes: 2 additions & 2 deletions src/components/dialog/observation-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dayjs.extend(utc);
* renders the observations as a chart
*
* @param dataUrl
* @returns JSX.Element
* @returns React.ReactElement
* @constructor
*/
export default function ObservationChart(chartProps) {
Expand Down Expand Up @@ -280,7 +280,7 @@ function get_yaxis_ticks(data) {
* Creates the chart.
*
* @param url
* @returns JSX.Element
* @returns React.ReactElement
* @constructor
*/
function CreateObsChart(c) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialog/observation-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ObservationChart from "@dialog/observation-chart";
* This component renders the observation dialog, including the chart
*
* @param obs_data
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const ObservationDialog = (obs_data) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/compare-layers/CompareLayersTray.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const getModelRunGroupList = (layers) => {
/**
* This component renders the model selection tray
*
* @returns JSX.Element
* @returns React.ReactElement
* @constructor
*/
export const CompareLayersTray = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/compare-layers/compare-layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CompareLayersTray } from "@compare-layers/CompareLayersTray.js";
/**
* component that handles the comparison of layers on the map.
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const CompareLayers = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/compare-layers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const title = 'Compare Layers';
/**
* render the model selection component
*
* @returns {JSX.Element}
* @returns React.ReactElement
*/
export const trayContents = () => (
<Stack gap={ 2 } p={ 2 }>
Expand Down
4 changes: 2 additions & 2 deletions src/components/trays/help-about/helpAboutTray.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import SvgIcon from '@mui/material/SvgIcon';
*
* @param color
* @param name
* @returns JSX.Element
* @returns React.ReactElement
*/
const getObsSVGIcon = ( color, name ) => {
return (
Expand All @@ -44,7 +44,7 @@ const getObsSVGIcon = ( color, name ) => {
/**
* This component renders the help/about tray
*
* @returns JSX.Element
* @returns React.ReactElement
* @constructor
*/
export const HelpAboutTray = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/help-about/help_about.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HelpAboutTray } from "./helpAboutTray.js";
/**
* component that renders the help/about tray.
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const HelpAbout = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/help-about/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const title = 'APSViz Help/About';
/**
* render the removal component
*
* @returns {JSX.Element}
* @returns React.ReactElement
*/
export const trayContents = () => (
<Stack gap={ 2 } p={ 2 }>
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/layers/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const newLayerDefaultState = (layer, group) => {
/**
* render the layers for the selected run groups
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const LayersList = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/model-selection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const title = 'ADCIRC Model selection';
/**
* render the model selection component
*
* @returns {JSX.Element}
* @returns React.ReactElement
*/
export const trayContents = () => (
<Stack gap={ 2 } p={ 2 }>
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/model-selection/model-selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ModelSelectionTray } from "@model-selection/modelSelectionTray.js";
/**
* component that handles the filtered selections of layers for the map.
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const ModelSelection = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/model-selection/modelSelectionTray.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {TropicalTabForm} from "@model-selection/tropicalTab";
/**
* This component renders the model selection tray
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const ModelSelectionTray = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/model-selection/synopticTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import dayjs from 'dayjs';
/**
* Form to filter/select synoptic runs
*
* @returns JSX.Element
* @returns React.ReactElement
* @constructor
*/
export const SynopticTabForm = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/model-selection/tropicalTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { getNamespacedEnvParam, getBrandingHandler } from "@utils/map-utils";
/**
* Form to filter/selt tropical runs
*
* @returns JSX.Element
* @returns React.ReactElement
* @constructor
*/
export const TropicalTabForm = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/remove/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const title = 'Remove items';
/**
* render the tray
*
* @returns {JSX.Element}
* @returns React.ReactElement
*/
export const trayContents = () => (
<Stack gap={ 2 } p={ 2 }>
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/remove/remove-models.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useLayers } from "@context";
/**
* component that handles the removal of all model runs.
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const RemoveModels = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/remove/remove-observations.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useLayers } from "@context";
/**
* component that handles the removal of observations.
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const RemoveAllObservations = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/remove/reset-compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useLayers } from "@context";
* component that handles the removal of styles from
* local storage ADCIRC raster layers
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const ResetCompare = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/remove/reset-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Button } from '@mui/joy';
* component that handles the removal of styles from
* local storage ADCIRC raster layers
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const ResetStyles = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/trays/settings/chart-yaxis.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import LineAxisRoundedIcon from '@mui/icons-material/LineAxisRounded';
/**
* renders the observation chart Y-axis slider
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const ObsChartYAxis = () => {
Expand Down Expand Up @@ -63,7 +63,7 @@ export const ObsChartYAxis = () => {
/**
* renders the icon
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const YAxisSlider = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/share/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const title = 'Share your view';
/**
* render the removal component
*
* @returns {JSX.Element}
* @returns React.ReactElement
*/
export const trayContents = () => (
<Stack gap={ 2 } p={ 2 }>
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/share/share-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useLayers } from "@context";
/**
* renders the shared content on the app as defined in the query string
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const ShareComment = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/share/shareViewTray.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ShareComment } from "@share/share-comment";
/**
* renders the shared content on the app as defined in the query string
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const ShareViewTray = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/trays/share/share_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ShareViewTray } from "@share/shareViewTray.js";
/**
* component that handles the filtered selections of layers for the map.
*
* @returns {JSX.Element}
* @returns React.ReactElement
* @constructor
*/
export const ShareView = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/context/map-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const LayersProvider = ({ children }) => {
* get the layer icon
*
* @param productType
* @returns JSX.Element
* @returns React.ReactElement
*/
const getLayerIcon = ( productType )=> {
// grab the icon
Expand Down