diff --git a/code/frontend/src/components/providers/RepositoryEditor.module.css b/code/frontend/src/components/providers/RepositoryEditor.module.css
index 38db5a2..5c079a3 100644
--- a/code/frontend/src/components/providers/RepositoryEditor.module.css
+++ b/code/frontend/src/components/providers/RepositoryEditor.module.css
@@ -6,8 +6,7 @@
"b d"
"b e"
"b f"
- "b g"
-;
+ "b g";
grid-template-columns: 400px 1fr;
grid-template-rows: auto auto auto 1fr auto;
diff --git a/code/frontend/src/contexts/ContextRepositoryEditor.js b/code/frontend/src/contexts/ContextRepositoryEditor.js
index 94b0ce5..abba378 100644
--- a/code/frontend/src/contexts/ContextRepositoryEditor.js
+++ b/code/frontend/src/contexts/ContextRepositoryEditor.js
@@ -1,4 +1,4 @@
-import {createContext} from "react";
+import { createContext } from "react"
/**
diff --git a/code/frontend/src/contexts/ContextServer.js b/code/frontend/src/contexts/ContextServer.js
index a5163f7..c9a8402 100644
--- a/code/frontend/src/contexts/ContextServer.js
+++ b/code/frontend/src/contexts/ContextServer.js
@@ -1,4 +1,4 @@
-import {createContext} from "react";
+import { createContext } from "react"
/**
diff --git a/code/frontend/src/contexts/ContextTheme.js b/code/frontend/src/contexts/ContextTheme.js
index 4e5543e..85f9a6b 100644
--- a/code/frontend/src/contexts/ContextTheme.js
+++ b/code/frontend/src/contexts/ContextTheme.js
@@ -1,4 +1,4 @@
-import {createContext} from "react";
+import { createContext } from "react"
/**
@@ -14,6 +14,6 @@ import {createContext} from "react";
const ContextTheme = createContext({
isSet: false,
theme: "ThemeDark",
- setTheme: () => console.error("Trying to setTheme while outside a ContextTheme.Provider!")
+ setTheme: () => console.error("Trying to setTheme while outside a ContextTheme.Provider!"),
})
export default ContextTheme
diff --git a/code/frontend/src/contexts/ContextUser.js b/code/frontend/src/contexts/ContextUser.js
index 5be3f92..9a883c5 100644
--- a/code/frontend/src/contexts/ContextUser.js
+++ b/code/frontend/src/contexts/ContextUser.js
@@ -1,4 +1,4 @@
-import {createContext} from "react";
+import { createContext } from "react"
/**
diff --git a/code/frontend/src/hooks/useArrayState.js b/code/frontend/src/hooks/useArrayState.js
index 08e169a..d52daf8 100644
--- a/code/frontend/src/hooks/useArrayState.js
+++ b/code/frontend/src/hooks/useArrayState.js
@@ -14,10 +14,10 @@ export default function useArrayState(def) {
newSingle => {
console.debug("Appending ", newSingle, " to ArrayState")
setValue(
- oldArray => [...oldArray, newSingle]
+ oldArray => [...oldArray, newSingle],
)
},
- []
+ [],
)
const spliceValue = useCallback(
@@ -28,21 +28,21 @@ export default function useArrayState(def) {
// TODO: Hope this doesn't break anything...
oldArray.splice(position, 1)
return oldArray
- }
+ },
)
},
- []
+ [],
)
const removeValue = useCallback(
remValue => {
console.debug("Removing ", remValue, " from ArrayState")
setValue(
- oldArray => oldArray.filter(item => JSON.stringify(item) !== JSON.stringify(remValue))
+ oldArray => oldArray.filter(item => JSON.stringify(item) !== JSON.stringify(remValue)),
)
},
- []
+ [],
)
- return {value, setValue, appendValue, spliceValue, removeValue}
+ return { value, setValue, appendValue, spliceValue, removeValue }
}
\ No newline at end of file
diff --git a/code/frontend/src/hooks/useData.js b/code/frontend/src/hooks/useData.js
index 304c6fa..07da6b5 100644
--- a/code/frontend/src/hooks/useData.js
+++ b/code/frontend/src/hooks/useData.js
@@ -1,4 +1,4 @@
-import { useCallback, useEffect, useState } from "react"
+import { useCallback, useState } from "react"
/**
@@ -28,15 +28,17 @@ export default function useData(fetchData, method, path, body, init) {
const _data = await fetchData(method, path, body, init)
console.debug(`Displaying data of ${method} ${path}: `, _data)
setData(_data)
- } catch(e) {
+ }
+ catch(e) {
console.debug(`Displaying error of ${method} ${path}: `, e)
setError(e)
- } finally {
+ }
+ finally {
console.debug(`Stopping loading of ${method} ${path}...`)
setLoading(false)
}
},
- [fetchData, method, path, body, init]
+ [fetchData, method, path, body, init],
)
/**
@@ -52,8 +54,8 @@ export default function useData(fetchData, method, path, body, init) {
await load()
},
- [load]
+ [load],
)
- return {data, error, loading, fetchNow}
+ return { data, error, loading, fetchNow }
}
\ No newline at end of file
diff --git a/code/frontend/src/hooks/useDataImmediately.js b/code/frontend/src/hooks/useDataImmediately.js
index 2cad8a5..dd5e84d 100644
--- a/code/frontend/src/hooks/useDataImmediately.js
+++ b/code/frontend/src/hooks/useDataImmediately.js
@@ -12,16 +12,18 @@ import { useEffect } from "react"
* @param init - Additional `init` parameters to pass to `fetch`.
*/
export default function useDataImmediately(fetchData, method, path, body, init) {
- const {data, error, loading, fetchNow} = useData(fetchData, method, path, body, init)
+ const { data, error, loading, fetchNow } = useData(fetchData, method, path, body, init)
useEffect(
() => {
- if(!(loading || data || error)) {
+ if(!(
+ loading || data || error
+ )) {
fetchNow()
}
},
- [data, error, loading, fetchNow]
+ [data, error, loading, fetchNow],
)
- return {data, error, loading, fetchNow}
+ return { data, error, loading, fetchNow }
}
diff --git a/code/frontend/src/hooks/useLocalStorageState.js b/code/frontend/src/hooks/useLocalStorageState.js
index f53c868..66f5be0 100644
--- a/code/frontend/src/hooks/useLocalStorageState.js
+++ b/code/frontend/src/hooks/useLocalStorageState.js
@@ -28,7 +28,7 @@ export default function useLocalStorageState(key, def) {
}
}
- const [value, setValue] = useState(load());
+ const [value, setValue] = useState(load())
/**
* Save a value to the {@link localStorage}.
@@ -43,7 +43,7 @@ export default function useLocalStorageState(key, def) {
console.warn(`Can't save ${key}; localStorage doesn't seem to be available...`)
}
},
- [key]
+ [key],
)
/**
@@ -54,7 +54,7 @@ export default function useLocalStorageState(key, def) {
setValue(value)
save(value)
},
- [save]
+ [save],
)
return [value, setAndSave]
diff --git a/code/frontend/src/routes/PageAlerts.module.css b/code/frontend/src/routes/PageAlerts.module.css
index 8ae9595..fdc5240 100644
--- a/code/frontend/src/routes/PageAlerts.module.css
+++ b/code/frontend/src/routes/PageAlerts.module.css
@@ -3,8 +3,7 @@
grid-template-areas:
"a"
- "b"
- ;
+ "b";
grid-gap: 10px;
diff --git a/code/frontend/src/routes/PageDashboard.module.css b/code/frontend/src/routes/PageDashboard.module.css
index bf8cad7..f062f37 100644
--- a/code/frontend/src/routes/PageDashboard.module.css
+++ b/code/frontend/src/routes/PageDashboard.module.css
@@ -3,8 +3,7 @@
grid-template-areas:
"a"
- "b"
- ;
+ "b";
grid-template-rows: auto 1fr;
grid-gap: 10px;
diff --git a/code/frontend/src/routes/PageEdit.js b/code/frontend/src/routes/PageEdit.js
index 25d4659..14c68d7 100644
--- a/code/frontend/src/routes/PageEdit.js
+++ b/code/frontend/src/routes/PageEdit.js
@@ -6,17 +6,14 @@ import RepositoryEditor from "../components/providers/RepositoryEditor"
import useDataImmediately from "../hooks/useDataImmediately"
import ContextUser from "../contexts/ContextUser"
import BoxAlert from "../components/base/BoxAlert"
-import RepositorySummaryBase from "../components/interactive/RepositorySummaryBase"
-import { faSearch } from "@fortawesome/free-solid-svg-icons"
import Loading from "../components/base/Loading"
-import BoxFull from "../components/base/BoxFull"
export default function PageEdit({ id, className, ...props }) {
- const {fetchDataAuth} = useContext(ContextUser)
- const {data, error} = useDataImmediately(fetchDataAuth, "GET", `/api/v1/repositories/${id}`)
+ const { fetchDataAuth } = useContext(ContextUser)
+ const { data, error } = useDataImmediately(fetchDataAuth, "GET", `/api/v1/repositories/${id}`)
- let contents;
+ let contents
if(error) {
contents = {error.toString()}
}
diff --git a/code/frontend/src/routes/PageRepositories.js b/code/frontend/src/routes/PageRepositories.js
index f44ac3c..8917551 100644
--- a/code/frontend/src/routes/PageRepositories.js
+++ b/code/frontend/src/routes/PageRepositories.js
@@ -10,10 +10,10 @@ import Loading from "../components/base/Loading"
export default function PageRepositories({ children, className, ...props }) {
- const {fetchDataAuth} = useContext(ContextUser)
- const {data, error, fetchNow: refresh} = useDataImmediately(fetchDataAuth, "GET", "/api/v1/repositories/")
+ const { fetchDataAuth } = useContext(ContextUser)
+ const { data, error, fetchNow: refresh } = useDataImmediately(fetchDataAuth, "GET", "/api/v1/repositories/")
- let contents;
+ let contents
if(error) {
contents = {error}
}
diff --git a/code/frontend/src/routes/PageRepositories.module.css b/code/frontend/src/routes/PageRepositories.module.css
index 39b1114..bc52dd5 100644
--- a/code/frontend/src/routes/PageRepositories.module.css
+++ b/code/frontend/src/routes/PageRepositories.module.css
@@ -3,8 +3,7 @@
grid-template-areas:
"a"
- "b"
- ;
+ "b";
grid-gap: 10px;
diff --git a/code/frontend/src/routes/PageRoot.js b/code/frontend/src/routes/PageRoot.js
index c671d67..68a8b1e 100644
--- a/code/frontend/src/routes/PageRoot.js
+++ b/code/frontend/src/routes/PageRoot.js
@@ -4,7 +4,7 @@ import { Redirect } from "react-router"
export default function PageRoot() {
- const {state} = useContext(ContextUser)
+ const { state } = useContext(ContextUser)
if(!state) {
return
diff --git a/code/frontend/src/utils/convertToLocalISODate.js b/code/frontend/src/utils/convertToLocalISODate.js
index bfc583a..16ad738 100644
--- a/code/frontend/src/utils/convertToLocalISODate.js
+++ b/code/frontend/src/utils/convertToLocalISODate.js
@@ -17,13 +17,15 @@ export default function convertToLocalISODate(date) {
const naive = date.toISOString()
// Find the local timezone
- const tz = - new Date().getTimezoneOffset()
+ const tz = -new Date().getTimezoneOffset()
// Convert the timezone to hours
const tzHours = Math.abs(Math.floor(tz / 60)).toString().padStart(2, "0")
// Find the minutes
- const tzMinutes = (tz % 60).toString().padStart(2, "0")
+ const tzMinutes = (
+ tz % 60
+ ).toString().padStart(2, "0")
// Replace the naive part with the aware part
return naive.replace("Z", `${tz < 0 ? "-" : "+"}${tzHours}${tzMinutes}`)
diff --git a/code/frontend/src/utils/make_icon.js b/code/frontend/src/utils/make_icon.js
index 968ab08..22f960d 100644
--- a/code/frontend/src/utils/make_icon.js
+++ b/code/frontend/src/utils/make_icon.js
@@ -4,7 +4,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
export default function make_icon(icon, className) {
if(isValidElement(icon)) {
- return icon;
+ return icon
}
else if(icon) {
return (
@@ -12,6 +12,6 @@ export default function make_icon(icon, className) {
)
}
else {
- return null;
+ return null
}
}
\ No newline at end of file