Skip to content

Commit

Permalink
Coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
jeppekroghitk committed Nov 12, 2024
1 parent 8ce9909 commit 1119da4
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/components/feed-sources/feed-source-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function FeedSourceForm({
name="feedType"
value={feedSource.feedType}
onChange={handleInput}
disabled={(mode === "PUT")}
disabled={mode === "PUT"}
options={feedSourceTypeOptions}
/>

Expand Down Expand Up @@ -117,7 +117,7 @@ FeedSourceForm.propTypes = {
loadingMessage: PropTypes.string,
dynamicFormElement: PropTypes.oneOfType([
PropTypes.element,
PropTypes.arrayOf(PropTypes.element)
PropTypes.arrayOf(PropTypes.element),
]),
feedSourceTypeOptions: PropTypes.arrayOf(
PropTypes.shape({
Expand Down
1 change: 0 additions & 1 deletion src/components/feed-sources/feed-source-manager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ function FeedSourceManager({
setFormStateObject({ ...initialState });
}, [initialState]);


useEffect(() => {
if (formStateObject && formStateObject.feedType) {
let newSecrets = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { React } from "react";
import PropTypes from "prop-types";
import FormInput from "../../util/forms/form-input";

const CalendarFeedTypeTemplate = ({ handleInput, formStateObject, t, mode }) => {
const CalendarFeedTypeTemplate = ({
handleInput,
formStateObject,
t,
mode,
}) => {
return (
<>
<FormInput
Expand All @@ -21,7 +26,6 @@ const CalendarFeedTypeTemplate = ({ handleInput, formStateObject, t, mode }) =>
);
};


CalendarFeedTypeTemplate.propTypes = {
handleInput: PropTypes.func,
formStateObject: PropTypes.shape({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { React } from "react";
import PropTypes from "prop-types";
import FormInput from "../../util/forms/form-input";

const EventDatabaseApiTemplate = ({ handleInput, formStateObject, t, mode }) => {
const EventDatabaseApiTemplate = ({
handleInput,
formStateObject,
t,
mode,
}) => {
return (
<>
<FormInput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { React } from "react";
import PropTypes from "prop-types";
import FormInput from "../../util/forms/form-input";

const NotifiedFeedTypeTemplate = ({ handleInput, formStateObject, t, mode }) => {
const NotifiedFeedTypeTemplate = ({
handleInput,
formStateObject,
t,
mode,
}) => {
return (
<>
<FormInput
Expand Down
8 changes: 2 additions & 6 deletions src/components/feed-sources/feed-sources-columns.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ import UserContext from "../../context/user-context.jsx";
* @returns {object} Columns - An array of objects representing the columns for
* feed sources data.
*/
function getFeedSourcesColumns({
apiCall,
infoModalRedirect,
infoModalTitle,
}) {
function getFeedSourcesColumns({ apiCall, infoModalRedirect, infoModalTitle }) {
const context = useContext(UserContext);
const { t } = useTranslation("common", { keyPrefix: "feed-sources-list" });

Expand All @@ -43,7 +39,7 @@ function getFeedSourcesColumns({
);
},
// eslint-disable-next-line react/prop-types
content: ({ id } ) => (
content: ({ id }) => (
<ListButton
apiCall={apiCall}
redirectTo={infoModalRedirect}
Expand Down
7 changes: 5 additions & 2 deletions src/components/feed-sources/feed-sources-list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import ListContext from "../../context/list-context.jsx";
import ContentBody from "../util/content-body/content-body.jsx";
import List from "../util/list/list.jsx";
import { FeedSourceColumns } from "../feed-sources/feed-sources-columns";
import { FeedSourceColumns } from "./feed-sources-columns";
import {
displayError,
displaySuccess,
Expand Down Expand Up @@ -119,7 +119,10 @@ function FeedSourcesList() {
// Error with retrieving list of feed sources
useEffect(() => {
if (feedSourcesGetError) {
displayError(t("error-messages.feed-sources-load-error"), feedSourcesGetError);
displayError(
t("error-messages.feed-sources-load-error"),
feedSourcesGetError
);
}
}, [feedSourcesGetError]);

Expand Down

0 comments on commit 1119da4

Please sign in to comment.