diff --git a/nest_frontend/App.test.js b/nest_frontend/App.test.js index dff93a8..d820924 100644 --- a/nest_frontend/App.test.js +++ b/nest_frontend/App.test.js @@ -1,10 +1,11 @@ // Link.react.test.js -import React from 'react' -import '@testing-library/jest-dom/extend-expect' -import { render, screen } from '@testing-library/react' +import React from "react" +import "@testing-library/jest-dom/extend-expect" +import { render, screen } from "@testing-library/react" import App from "./App" -test('App renders without exploding', () => { + +test("App renders without exploding", () => { render() expect(screen.getByRole("main")).toBeVisible() -}); +}) diff --git a/nest_frontend/LocalizationStrings.js b/nest_frontend/LocalizationStrings.js index dbd83db..4cec0a8 100644 --- a/nest_frontend/LocalizationStrings.js +++ b/nest_frontend/LocalizationStrings.js @@ -210,5 +210,5 @@ export default { type: "Tyyppi", admin: "Ylläpitäjä", user: "Käyttäjä", - } + }, } diff --git a/nest_frontend/components/interactive/BoxConditionDatetime.js b/nest_frontend/components/interactive/BoxConditionDatetime.js index 7645374..8224937 100644 --- a/nest_frontend/components/interactive/BoxConditionDatetime.js +++ b/nest_frontend/components/interactive/BoxConditionDatetime.js @@ -28,7 +28,7 @@ export default function BoxConditionDatetime({ ...props }) { const [datetime, setDatetime] = useState("") const [ba, setBa] = useState(false) const { addCondition } = useRepositoryEditor() - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) const onInputChange = event => { let text = event.target.value diff --git a/nest_frontend/components/interactive/BoxConditionHashtag.js b/nest_frontend/components/interactive/BoxConditionHashtag.js index b91cc48..f808b20 100644 --- a/nest_frontend/components/interactive/BoxConditionHashtag.js +++ b/nest_frontend/components/interactive/BoxConditionHashtag.js @@ -26,7 +26,7 @@ const INVALID_HASHTAG_CHARACTERS = /([^a-z0-9_\u00c0-\u00d6\u00d8-\u00f6\u00f8-\ export default function BoxConditionHashtag({ ...props }) { const [hashtag, setHashtag] = useState("") const { addCondition } = useRepositoryEditor() - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) const onInputChange = event => { let text = event.target.value diff --git a/nest_frontend/components/interactive/BoxConditionMap.js b/nest_frontend/components/interactive/BoxConditionMap.js index 4103575..0cf8bdc 100644 --- a/nest_frontend/components/interactive/BoxConditionMap.js +++ b/nest_frontend/components/interactive/BoxConditionMap.js @@ -1,7 +1,7 @@ import React, { useCallback, useContext, useEffect, useState } from "react" import BoxFull from "../base/BoxFull" import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" -import { faAt, faMapPin, faPlus } from "@fortawesome/free-solid-svg-icons" +import { faMapPin, faPlus } from "@fortawesome/free-solid-svg-icons" import Style from "./BoxConditionMap.module.css" import ButtonIconOnly from "../base/ButtonIconOnly" import { MapContainer, TileLayer } from "react-leaflet" @@ -54,7 +54,7 @@ export default function BoxConditionMap({ ...props }) { const [zoom, setZoom] = useState(STARTING_ZOOM) const [map, setMap] = useState(null) const { addCondition } = useRepositoryEditor() - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) const onMove = useCallback( () => { diff --git a/nest_frontend/components/interactive/BoxConditionUser.js b/nest_frontend/components/interactive/BoxConditionUser.js index 6b74770..01d9328 100644 --- a/nest_frontend/components/interactive/BoxConditionUser.js +++ b/nest_frontend/components/interactive/BoxConditionUser.js @@ -25,7 +25,7 @@ const INVALID_USER_CHARACTERS = /[^a-zA-Z0-9]/g export default function BoxConditionUser({ ...props }) { const [user, setUser] = useState("") const { addCondition } = useRepositoryEditor() - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) const onInputChange = event => { let text = event.target.value diff --git a/nest_frontend/components/interactive/BoxConditions.js b/nest_frontend/components/interactive/BoxConditions.js index 10c2573..92bf5cd 100644 --- a/nest_frontend/components/interactive/BoxConditions.js +++ b/nest_frontend/components/interactive/BoxConditions.js @@ -14,7 +14,7 @@ import ContextLanguage from "../../contexts/ContextLanguage" */ export default function BoxConditions({ ...props }) { const { conditions } = useRepositoryEditor() - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) const badges = conditions.map((cond, pos) => ) diff --git a/nest_frontend/components/interactive/BoxLoggedIn.js b/nest_frontend/components/interactive/BoxLoggedIn.js index 15f82de..ad3488c 100644 --- a/nest_frontend/components/interactive/BoxLoggedIn.js +++ b/nest_frontend/components/interactive/BoxLoggedIn.js @@ -20,7 +20,7 @@ import ContextLanguage from "../../contexts/ContextLanguage" export default function BoxLoggedIn({ ...props }) { const { logout } = useContext(ContextUser) const history = useHistory() - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) return ( diff --git a/nest_frontend/components/interactive/BoxLogin.js b/nest_frontend/components/interactive/BoxLogin.js index b2e70d4..36036e1 100644 --- a/nest_frontend/components/interactive/BoxLogin.js +++ b/nest_frontend/components/interactive/BoxLogin.js @@ -25,7 +25,7 @@ export default function BoxLogin({ ...props }) { const [error, setError] = useState(null) const { login } = useContext(ContextUser) const history = useHistory() - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) const doLogin = async () => { if(working) { diff --git a/nest_frontend/components/interactive/BoxRepositoriesActive.js b/nest_frontend/components/interactive/BoxRepositoriesActive.js index 8cc17fa..cdf6348 100644 --- a/nest_frontend/components/interactive/BoxRepositoriesActive.js +++ b/nest_frontend/components/interactive/BoxRepositoriesActive.js @@ -6,6 +6,7 @@ import Loading from "../base/Loading" import BoxFullScrollable from "../base/BoxFullScrollable" import ContextLanguage from "../../contexts/ContextLanguage" + /** * A {@link BoxFull} listing all the user's active repositories. * @@ -25,7 +26,7 @@ export default function BoxRepositoriesActive({ ...props }) { const { user } = useContext(ContextUser) - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) let contents if(repositories === null) { diff --git a/nest_frontend/components/interactive/BoxRepositoriesArchived.js b/nest_frontend/components/interactive/BoxRepositoriesArchived.js index 9114f69..ba9f7b5 100644 --- a/nest_frontend/components/interactive/BoxRepositoriesArchived.js +++ b/nest_frontend/components/interactive/BoxRepositoriesArchived.js @@ -26,7 +26,7 @@ export default function BoxRepositoriesArchived({ ...props }) { const { user } = useContext(ContextUser) - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) let contents if(repositories === null) { diff --git a/nest_frontend/components/interactive/BoxRepositoryCreate.js b/nest_frontend/components/interactive/BoxRepositoryCreate.js index e24fbf8..8025975 100644 --- a/nest_frontend/components/interactive/BoxRepositoryCreate.js +++ b/nest_frontend/components/interactive/BoxRepositoryCreate.js @@ -34,7 +34,7 @@ export default function BoxRepositoryCreate({ running, ...props }) { } = useRepositoryEditor() const history = useHistory() - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) return ( diff --git a/nest_frontend/components/interactive/BoxSetServer.js b/nest_frontend/components/interactive/BoxSetServer.js index 6dc6973..91965b9 100644 --- a/nest_frontend/components/interactive/BoxSetServer.js +++ b/nest_frontend/components/interactive/BoxSetServer.js @@ -17,7 +17,7 @@ import ContextLanguage from "../../contexts/ContextLanguage" */ export default function BoxSetServer({ ...props }) { const { server, setServer } = useContext(ContextServer) - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) return ( diff --git a/nest_frontend/components/interactive/BoxUserCreate.js b/nest_frontend/components/interactive/BoxUserCreate.js index af9c4b9..5996a03 100644 --- a/nest_frontend/components/interactive/BoxUserCreate.js +++ b/nest_frontend/components/interactive/BoxUserCreate.js @@ -14,7 +14,7 @@ export default function BoxUserCreate({ createUser, running, ...props }) { const [email, setEmail] = useState("") const [password, setPassword] = useState("") const [error, setError] = useState(undefined) - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) const onButtonClick = useCallback( async () => { diff --git a/nest_frontend/components/interactive/BoxUserList.js b/nest_frontend/components/interactive/BoxUserList.js index 161de0e..db0f6a4 100644 --- a/nest_frontend/components/interactive/BoxUserList.js +++ b/nest_frontend/components/interactive/BoxUserList.js @@ -6,7 +6,7 @@ import ContextLanguage from "../../contexts/ContextLanguage" export default function BoxUserList({ users, destroyUser, running, ...props }) { - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) let contents if(users === null) { diff --git a/nest_frontend/components/interactive/BoxWordcloud.js b/nest_frontend/components/interactive/BoxWordcloud.js index 6d96b6a..191844c 100644 --- a/nest_frontend/components/interactive/BoxWordcloud.js +++ b/nest_frontend/components/interactive/BoxWordcloud.js @@ -13,11 +13,11 @@ import ContextLanguage from "../../contexts/ContextLanguage" * @constructor */ export default function BoxWordcloud({ words, props }) { - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) return ( -
+
{ onUpdate(!value) diff --git a/nest_frontend/components/interactive/LoggedInUser.js b/nest_frontend/components/interactive/LoggedInUser.js index e3559bc..e611408 100644 --- a/nest_frontend/components/interactive/LoggedInUser.js +++ b/nest_frontend/components/interactive/LoggedInUser.js @@ -14,7 +14,7 @@ import ContextLanguage from "../../contexts/ContextLanguage" */ export default function LoggedInUser({ ...props }) { const { user } = useContext(ContextUser) - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) if(!user) { return ( diff --git a/nest_frontend/components/interactive/Logo.js b/nest_frontend/components/interactive/Logo.js index f6256c2..956c541 100644 --- a/nest_frontend/components/interactive/Logo.js +++ b/nest_frontend/components/interactive/Logo.js @@ -19,7 +19,7 @@ import ContextLanguage from "../../contexts/ContextLanguage" */ export default function Logo({ className, ...props }) { const { theme } = useContext(ContextTheme) - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) let logo if(theme === "ThemeDark") { diff --git a/nest_frontend/components/interactive/SelectLanguage.js b/nest_frontend/components/interactive/SelectLanguage.js index 6aa3429..3bc7652 100644 --- a/nest_frontend/components/interactive/SelectLanguage.js +++ b/nest_frontend/components/interactive/SelectLanguage.js @@ -12,7 +12,7 @@ import ContextLanguage from "../../contexts/ContextLanguage" * @constructor */ export default function SelectLanguage({ ...props }) { - const {strings, lang, setLang} = useContext(ContextLanguage) + const { strings, lang, setLang } = useContext(ContextLanguage) return ( setTheme(e.target.value)} {...props}> diff --git a/nest_frontend/components/interactive/Sidebar.js b/nest_frontend/components/interactive/Sidebar.js index be94dd8..a845cef 100644 --- a/nest_frontend/components/interactive/Sidebar.js +++ b/nest_frontend/components/interactive/Sidebar.js @@ -3,14 +3,7 @@ import Style from "./Sidebar.module.css" import classNames from "classnames" import Logo from "../interactive/Logo" import ButtonSidebar from "../base/ButtonSidebar" -import { - faCog, - faExclamationTriangle, - faFolder, - faHome, - faKey, - faUserCog, -} from "@fortawesome/free-solid-svg-icons" +import { faCog, faExclamationTriangle, faFolder, faHome, faKey, faUserCog } from "@fortawesome/free-solid-svg-icons" import ContextUser from "../../contexts/ContextUser" import ContextLanguage from "../../contexts/ContextLanguage" @@ -26,7 +19,7 @@ import ContextLanguage from "../../contexts/ContextLanguage" */ export default function Sidebar({ className, ...props }) { const { user } = useContext(ContextUser) - const {strings} = useContext(ContextLanguage) + const { strings } = useContext(ContextLanguage) return (