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

🧹 Reformat code

This commit is contained in:
Steffo 2021-05-13 17:05:33 +02:00
parent 396311aefd
commit 3961ac27b6
Signed by: steffo
GPG key ID: 6965406171929D01
7 changed files with 32 additions and 20 deletions

View file

@ -16,8 +16,8 @@ Per installare le dipendenze del frontend, è necessario eseguire in questa cart
npm install npm install
``` ```
Questo scaricherà da [npm](https://www.npmjs.com/) tutte le dipendenze necessarie ad avviare il development server, Questo scaricherà da [npm](https://www.npmjs.com/) tutte le dipendenze necessarie ad avviare il development server, e le
e le inserirà nella cartella `node_modules`. inserirà nella cartella `node_modules`.
> Nota: La cartella `node_modules` **non deve essere committata**! > Nota: La cartella `node_modules` **non deve essere committata**!
@ -33,8 +33,8 @@ Questo avvierà un webserver su `localhost` legato alla porta TCP `3000`.
## Sviluppo ## Sviluppo
Mentre il development server è avviato, qualsiasi modifica verrà immediatamente applicata sulla Mentre il development server è avviato, qualsiasi modifica verrà immediatamente applicata sulla pagina web di anteprima
pagina web di anteprima a http://localhost:3000 . a http://localhost:3000 .
## Documentazione ## Documentazione
@ -50,5 +50,5 @@ Per compilare il frontend in una webapp ottimizzata per l'uso in production, è
npm build npm build
``` ```
La pagina web e le sue risorse saranno create all'interno della cartella `build`, pronte per essere servite tramite La pagina web e le sue risorse saranno create all'interno della cartella `build`, pronte per essere servite tramite un
un qualsiasi webserver di pagine statiche. qualsiasi webserver di pagine statiche.

View file

@ -24,12 +24,16 @@
work correctly both with client-side routing and a non-root public URL. work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`. Learn how to configure a non-root public URL by running `npm run build`.
--> -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" <link
crossorigin="" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""/> rel="stylesheet"
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js" />
<script
crossorigin=""
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
crossorigin=""></script> src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
></script>
<title>N.E.S.T.</title> <title>N.E.S.T.</title>
</head> </head>
<body> <body>

View file

@ -1,5 +1,4 @@
import React, { useContext } from "react" import React, { useContext } from "react"
import BoxFull from "../base/BoxFull"
import SummaryRepository from "./SummaryRepository" import SummaryRepository from "./SummaryRepository"
import { faFolderOpen } from "@fortawesome/free-solid-svg-icons" import { faFolderOpen } from "@fortawesome/free-solid-svg-icons"
import ContextUser from "../../contexts/ContextUser" import ContextUser from "../../contexts/ContextUser"
@ -18,7 +17,13 @@ import BoxFullScrollable from "../base/BoxFullScrollable"
* @returns {JSX.Element} * @returns {JSX.Element}
* @constructor * @constructor
*/ */
export default function BoxRepositoriesActive({ repositories, archiveRepository, destroyRepository, running, ...props }) { export default function BoxRepositoriesActive({
repositories,
archiveRepository,
destroyRepository,
running,
...props
}) {
const { user } = useContext(ContextUser) const { user } = useContext(ContextUser)
let contents let contents

View file

@ -1,5 +1,4 @@
import React, { useContext } from "react" import React, { useContext } from "react"
import BoxFull from "../base/BoxFull"
import SummaryRepository from "./SummaryRepository" import SummaryRepository from "./SummaryRepository"
import { faFolderOpen } from "@fortawesome/free-solid-svg-icons" import { faFolderOpen } from "@fortawesome/free-solid-svg-icons"
import ContextUser from "../../contexts/ContextUser" import ContextUser from "../../contexts/ContextUser"
@ -18,7 +17,13 @@ import BoxFullScrollable from "../base/BoxFullScrollable"
* @returns {JSX.Element} * @returns {JSX.Element}
* @constructor * @constructor
*/ */
export default function BoxRepositoriesArchived({ repositories, archiveRepository, destroyRepository, running, ...props }) { export default function BoxRepositoriesArchived({
repositories,
archiveRepository,
destroyRepository,
running,
...props
}) {
const { user } = useContext(ContextUser) const { user } = useContext(ContextUser)
let contents let contents

View file

@ -1,9 +1,7 @@
import React, { useContext } from "react" import React from "react"
import Button from "../base/Button" import Button from "../base/Button"
import { faArchive, faFolder, faFolderOpen, faPencilAlt, faTrash } from "@fortawesome/free-solid-svg-icons" import { faArchive, faFolder, faFolderOpen, faPencilAlt, faTrash } from "@fortawesome/free-solid-svg-icons"
import { useHistory } from "react-router" import { useHistory } from "react-router"
import useBackend from "../../hooks/useBackend"
import ContextUser from "../../contexts/ContextUser"
import Summary from "../base/Summary" import Summary from "../base/Summary"

View file

@ -143,7 +143,7 @@ export default function useBackendViewset(resourcesPath, pkName) {
} }
return {} return {}
}, },
[apiRetrieve, pkName] [apiRetrieve, pkName],
) )
const createResource = useCallback( const createResource = useCallback(

View file

@ -1,4 +1,4 @@
import React, { useCallback, useContext } from "react" import React, { useCallback } from "react"
import Style from "./PageRepositories.module.css" import Style from "./PageRepositories.module.css"
import classNames from "classnames" import classNames from "classnames"
import BoxRepositoriesActive from "../components/interactive/BoxRepositoriesActive" import BoxRepositoriesActive from "../components/interactive/BoxRepositoriesActive"
@ -22,7 +22,7 @@ export default function PageRepositories({ children, className, ...props }) {
} }
return {} return {}
}, },
[bv.apiRequest, bv.refreshResource] [bv.apiRequest, bv.refreshResource],
) )
return ( return (