From 23c0c067d2f232807b3f6de6059cdab90e4e8d32 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Tue, 10 Dec 2024 07:04:54 +0100 Subject: [PATCH] 1241: Applied coding standards --- src/components/screen/screen-status.jsx | 4 ++-- src/components/screen/util/campaign-icon.jsx | 6 ++---- src/components/screen/util/screen-columns.jsx | 2 +- src/components/util/list/list-button.jsx | 2 +- src/redux/dynamic-base-query.js | 4 +++- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/screen/screen-status.jsx b/src/components/screen/screen-status.jsx index 92ff9724..df449e9c 100644 --- a/src/components/screen/screen-status.jsx +++ b/src/components/screen/screen-status.jsx @@ -26,7 +26,7 @@ import ConfigLoader from "../../config-loader"; * @param {object} props The props. * @param {object} props.screen The screen. * @param {string | null} props.mode The display mode: 'default' or 'minimal' - * @param {func} props.handleInput Handler for change in input. + * @param {Function} props.handleInput Handler for change in input. * @returns {JSX.Element} The status element. */ function ScreenStatus({ screen, handleInput = () => {}, mode = "default" }) { @@ -120,7 +120,7 @@ function ScreenStatus({ screen, handleInput = () => {}, mode = "default" }) { className="margin-right-button" size="sm" > - {t('connect')} + {t("connect")} ); } diff --git a/src/components/screen/util/campaign-icon.jsx b/src/components/screen/util/campaign-icon.jsx index b3592bb2..145bef7a 100644 --- a/src/components/screen/util/campaign-icon.jsx +++ b/src/components/screen/util/campaign-icon.jsx @@ -31,10 +31,8 @@ function CampaignIcon({ id, delay }) { { id }, { skip: !getData } ); - const { data: groups, isLoading: isLoadingScreenGroups } = useGetV2ScreensByIdScreenGroupsQuery( - { id }, - { skip: !getData } - ); + const { data: groups, isLoading: isLoadingScreenGroups } = + useGetV2ScreensByIdScreenGroupsQuery({ id }, { skip: !getData }); useEffect(() => { if (campaigns) { diff --git a/src/components/screen/util/screen-columns.jsx b/src/components/screen/util/screen-columns.jsx index d716572e..74d5e6c7 100644 --- a/src/components/screen/util/screen-columns.jsx +++ b/src/components/screen/util/screen-columns.jsx @@ -15,7 +15,7 @@ import ScreenStatus from "../screen-status"; * @param {string} props.infoModalRedirect - The url for redirecting in the info modal. * @param {string} props.infoModalTitle - The info modal title. * @param {string} props.dataKey The data key for mapping the data. - * @param {bool} props.displayStatus Should status be displayed? + * @param {boolean} props.displayStatus Should status be displayed? * @returns {object} The columns for the screens lists. */ function getScreenColumns({ diff --git a/src/components/util/list/list-button.jsx b/src/components/util/list/list-button.jsx index ea6e90d7..3b6bd8fa 100644 --- a/src/components/util/list/list-button.jsx +++ b/src/components/util/list/list-button.jsx @@ -18,7 +18,7 @@ function ListButton({ redirectTo, displayData, modalTitle, - delayApiCall= 0, + delayApiCall = 0, apiCall = () => {}, dataKey = "", }) { diff --git a/src/redux/dynamic-base-query.js b/src/redux/dynamic-base-query.js index b2b9d563..3d94b927 100644 --- a/src/redux/dynamic-base-query.js +++ b/src/redux/dynamic-base-query.js @@ -29,7 +29,9 @@ const extendedBaseQuery = async (args, api, extraOptions) => { if (newArgs.params["screenUser.latestRequest"]) { const key = Object.keys(newArgs.params["screenUser.latestRequest"])[0]; - const value = Object.values(newArgs.params["screenUser.latestRequest"])[0]; + const value = Object.values( + newArgs.params["screenUser.latestRequest"] + )[0]; newArgs.params[`screenUser.latestRequest[${key}]`] = `${value}`; }