From 809d86758cca2f98226d83b3eeca01eceeacd8e6 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi <256895@studenti.unimore.it> Date: Tue, 11 May 2021 16:37:15 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Reformat=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/frontend/src/PageSwitcher.js | 2 +- code/frontend/src/components/base/Button.js | 2 +- .../src/components/base/ButtonSidebar.js | 2 +- .../src/components/base/ButtonSmallX.js | 2 +- .../src/components/base/InputWithIcon.js | 4 +- code/frontend/src/components/base/Loading.js | 2 +- code/frontend/src/components/base/Radio.js | 1 + code/frontend/src/components/base/TextArea.js | 5 +- .../components/base/formparts/FormLabel.js | 2 +- .../interactive/BoxConditionDatetime.js | 8 +-- .../interactive/BoxConditionHashtag.js | 4 +- .../components/interactive/BoxConditionMap.js | 25 ++++---- .../interactive/BoxConditionUser.js | 4 +- .../components/interactive/BoxConditions.js | 2 +- .../src/components/interactive/BoxLoggedIn.js | 8 ++- .../src/components/interactive/BoxLogin.js | 12 ++-- .../interactive/BoxRepositoriesActive.js | 4 +- .../interactive/BoxRepositoriesArchived.js | 4 +- .../interactive/BoxRepositoryCreate.js | 49 ++++++++------- .../components/interactive/BoxSetServer.js | 2 +- .../components/interactive/ConditionBadge.js | 14 +++-- .../components/interactive/CurrentServer.js | 4 +- .../components/interactive/Layout.module.css | 3 +- .../components/interactive/LoggedInUser.js | 2 +- .../src/components/interactive/Logo.js | 6 +- .../interactive/RepositorySummaryBase.js | 60 +++++++++---------- .../RepositorySummaryBase.module.css | 3 +- .../src/components/interactive/SelectTheme.js | 4 +- .../src/components/interactive/Sidebar.js | 6 +- .../src/components/providers/GlobalServer.js | 2 +- .../src/components/providers/GlobalTheme.js | 2 +- .../src/components/providers/GlobalUser.js | 4 +- .../components/providers/RepositoryEditor.js | 54 +++++++++-------- .../providers/RepositoryEditor.module.css | 3 +- .../src/contexts/ContextRepositoryEditor.js | 2 +- code/frontend/src/contexts/ContextServer.js | 2 +- code/frontend/src/contexts/ContextTheme.js | 4 +- code/frontend/src/contexts/ContextUser.js | 2 +- code/frontend/src/hooks/useArrayState.js | 14 ++--- code/frontend/src/hooks/useData.js | 14 +++-- code/frontend/src/hooks/useDataImmediately.js | 10 ++-- .../src/hooks/useLocalStorageState.js | 6 +- .../frontend/src/routes/PageAlerts.module.css | 3 +- .../src/routes/PageDashboard.module.css | 3 +- code/frontend/src/routes/PageEdit.js | 9 +-- code/frontend/src/routes/PageRepositories.js | 6 +- .../src/routes/PageRepositories.module.css | 3 +- code/frontend/src/routes/PageRoot.js | 2 +- .../src/utils/convertToLocalISODate.js | 6 +- code/frontend/src/utils/make_icon.js | 4 +- 50 files changed, 207 insertions(+), 194 deletions(-) diff --git a/code/frontend/src/PageSwitcher.js b/code/frontend/src/PageSwitcher.js index 309da02..bb070b0 100644 --- a/code/frontend/src/PageSwitcher.js +++ b/code/frontend/src/PageSwitcher.js @@ -1,4 +1,4 @@ -import React from "react" +import React from "react" import { Route, Switch } from "react-router" import PageLogin from "./routes/PageLogin" import PageRepositories from "./routes/PageRepositories" diff --git a/code/frontend/src/components/base/Button.js b/code/frontend/src/components/base/Button.js index 1e4079e..1c0dc3f 100644 --- a/code/frontend/src/components/base/Button.js +++ b/code/frontend/src/components/base/Button.js @@ -1,4 +1,4 @@ -import React from "react" +import React from "react" import Style from "./Button.module.css" import classNames from "classnames" import make_icon from "../../utils/make_icon" diff --git a/code/frontend/src/components/base/ButtonSidebar.js b/code/frontend/src/components/base/ButtonSidebar.js index 1f65a37..d0d3ef8 100644 --- a/code/frontend/src/components/base/ButtonSidebar.js +++ b/code/frontend/src/components/base/ButtonSidebar.js @@ -22,7 +22,7 @@ export default function ButtonSidebar({ icon, children, to, className, ...props path: to, strict: true, exact: true, - }); + }) if(match) { className = classNames(Style.Active, className) diff --git a/code/frontend/src/components/base/ButtonSmallX.js b/code/frontend/src/components/base/ButtonSmallX.js index ab55e25..7208596 100644 --- a/code/frontend/src/components/base/ButtonSmallX.js +++ b/code/frontend/src/components/base/ButtonSmallX.js @@ -1,7 +1,7 @@ import React from "react" import Style from "./ButtonSmallX.module.css" import classNames from "classnames" -import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" import { faTimes } from "@fortawesome/free-solid-svg-icons" diff --git a/code/frontend/src/components/base/InputWithIcon.js b/code/frontend/src/components/base/InputWithIcon.js index da72870..bc84e3b 100644 --- a/code/frontend/src/components/base/InputWithIcon.js +++ b/code/frontend/src/components/base/InputWithIcon.js @@ -1,4 +1,4 @@ -import React, {useState} from "react" +import React, { useState } from "react" import Style from "./InputWithIcon.module.css" import classNames from "classnames" import make_icon from "../../utils/make_icon" @@ -17,7 +17,7 @@ import make_icon from "../../utils/make_icon" * @constructor */ export default function InputWithIcon({ icon, className, ...props }) { - const [isFocused, setFocused] = useState(false); + const [isFocused, setFocused] = useState(false) return (