From 24ae4e73542864e807d98b827e9639d676255ba6 Mon Sep 17 00:00:00 2001 From: Jan Kessler Date: Fri, 26 Apr 2024 18:39:00 +0200 Subject: [PATCH] eslint + add description above server tag row --- .../rooms/room/room_settings/RoomSettings.jsx | 3 ++- .../rooms/room/room_settings/ServerTagRow.jsx | 16 +++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/javascript/components/rooms/room/room_settings/RoomSettings.jsx b/app/javascript/components/rooms/room/room_settings/RoomSettings.jsx index cca6771df94..3f579abd581 100644 --- a/app/javascript/components/rooms/room/room_settings/RoomSettings.jsx +++ b/app/javascript/components/rooms/room/room_settings/RoomSettings.jsx @@ -69,10 +69,11 @@ export default function RoomSettings() { /> {(process.env.SERVER_TAG_NAMES !== '') && ( )} diff --git a/app/javascript/components/rooms/room/room_settings/ServerTagRow.jsx b/app/javascript/components/rooms/room/room_settings/ServerTagRow.jsx index 39ffc246b1b..a83d7083626 100644 --- a/app/javascript/components/rooms/room/room_settings/ServerTagRow.jsx +++ b/app/javascript/components/rooms/room/room_settings/ServerTagRow.jsx @@ -16,11 +16,13 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Row, Col, Dropdown, ButtonGroup, ToggleButton } from 'react-bootstrap'; +import { + Row, Col, Dropdown, ButtonGroup, ToggleButton +} from 'react-bootstrap'; import SimpleSelect from '../../../shared_components/utilities/SimpleSelect'; export default function ServerTagRow({ - currentTag, tagRequired, allowedTags, updateMutation: useUpdateAPI, + updateMutation: useUpdateAPI, currentTag, tagRequired, allowedTags, description, }) { const updateAPI = useUpdateAPI(); @@ -54,6 +56,7 @@ export default function ServerTagRow({ return ( +
{description}
{[ @@ -73,11 +76,10 @@ export default function ServerTagRow({ key="desired" id="desired" type="radio" - variant='outline-success' + variant="outline-success" name="radio" checked={tagRequired === false} onChange={(event) => { - console.log(event); updateAPI.mutate({ settingName: 'serverTagRequired', settingValue: false }); }} > @@ -87,11 +89,10 @@ export default function ServerTagRow({ key="required" id="required" type="radio" - variant='outline-danger' + variant="outline-danger" name="radio" checked={tagRequired === true} onChange={(event) => { - console.log(event); updateAPI.mutate({ settingName: 'serverTagRequired', settingValue: true }); }} > @@ -109,8 +110,9 @@ ServerTagRow.defaultProps = { }; ServerTagRow.propTypes = { + updateMutation: PropTypes.func.isRequired, currentTag: PropTypes.string, tagRequired: PropTypes.bool, allowedTags: PropTypes.arrayOf(PropTypes.string).isRequired, - updateMutation: PropTypes.func.isRequired, + description: PropTypes.string.isRequired, };