1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-25 22:44:19 +00:00

🧹 Cleanup code

This commit is contained in:
Steffo 2021-05-18 02:48:34 +02:00
parent 8f324a0f23
commit ce0a8d321e
Signed by: steffo
GPG key ID: 6965406171929D01
27 changed files with 36 additions and 44 deletions

View file

@ -1,10 +1,11 @@
// Link.react.test.js // Link.react.test.js
import React from 'react' import React from "react"
import '@testing-library/jest-dom/extend-expect' import "@testing-library/jest-dom/extend-expect"
import { render, screen } from '@testing-library/react' import { render, screen } from "@testing-library/react"
import App from "./App" import App from "./App"
test('App renders without exploding', () => {
test("App renders without exploding", () => {
render(<App/>) render(<App/>)
expect(screen.getByRole("main")).toBeVisible() expect(screen.getByRole("main")).toBeVisible()
}); })

View file

@ -210,5 +210,5 @@ export default {
type: "Tyyppi", type: "Tyyppi",
admin: "Ylläpitäjä", admin: "Ylläpitäjä",
user: "Käyttäjä", user: "Käyttäjä",
} },
} }

View file

@ -1,7 +1,7 @@
import React, { useCallback, useContext, useEffect, useState } from "react" import React, { useCallback, useContext, useEffect, useState } from "react"
import BoxFull from "../base/BoxFull" import BoxFull from "../base/BoxFull"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" 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 Style from "./BoxConditionMap.module.css"
import ButtonIconOnly from "../base/ButtonIconOnly" import ButtonIconOnly from "../base/ButtonIconOnly"
import { MapContainer, TileLayer } from "react-leaflet" import { MapContainer, TileLayer } from "react-leaflet"

View file

@ -6,6 +6,7 @@ import Loading from "../base/Loading"
import BoxFullScrollable from "../base/BoxFullScrollable" import BoxFullScrollable from "../base/BoxFullScrollable"
import ContextLanguage from "../../contexts/ContextLanguage" import ContextLanguage from "../../contexts/ContextLanguage"
/** /**
* A {@link BoxFull} listing all the user's active repositories. * A {@link BoxFull} listing all the user's active repositories.
* *

View file

@ -3,14 +3,7 @@ import Style from "./Sidebar.module.css"
import classNames from "classnames" import classNames from "classnames"
import Logo from "../interactive/Logo" import Logo from "../interactive/Logo"
import ButtonSidebar from "../base/ButtonSidebar" import ButtonSidebar from "../base/ButtonSidebar"
import { import { faCog, faExclamationTriangle, faFolder, faHome, faKey, faUserCog } from "@fortawesome/free-solid-svg-icons"
faCog,
faExclamationTriangle,
faFolder,
faHome,
faKey,
faUserCog,
} from "@fortawesome/free-solid-svg-icons"
import ContextUser from "../../contexts/ContextUser" import ContextUser from "../../contexts/ContextUser"
import ContextLanguage from "../../contexts/ContextLanguage" import ContextLanguage from "../../contexts/ContextLanguage"

View file

@ -1,14 +1,11 @@
import React, { useContext } from "react" import React from "react"
import Style from "./PageDashboard.module.css" import Style from "./PageDashboard.module.css"
import classNames from "classnames" import classNames from "classnames"
import BoxHeader from "../components/base/BoxHeader" import BoxHeader from "../components/base/BoxHeader"
import RepositoryEditor from "../components/providers/RepositoryEditor" import RepositoryEditor from "../components/providers/RepositoryEditor"
import ContextLanguage from "../contexts/ContextLanguage"
export default function PageDashboard({ children, className, ...props }) { export default function PageDashboard({ children, className, ...props }) {
const {strings} = useContext(ContextLanguage)
return ( return (
<div className={classNames(Style.PageHome, className)} {...props}> <div className={classNames(Style.PageHome, className)} {...props}>
<BoxHeader className={Style.Header}> <BoxHeader className={Style.Header}>