0351d front end linting (#377)

* feat: disable custom script for  trial users

* after lint fix

* frontend linting

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Favour Olayinka
2024-04-15 18:39:03 +01:00
committed by GitHub
parent 8d35fc8b1a
commit bcd45ce8a6
228 changed files with 17036 additions and 8744 deletions

View File

@@ -1,8 +1,6 @@
// Composable with all the logic to encapsulate a default content store
export const useContentStore = (mapKey = 'id') => {
export const useContentStore = (mapKey = "id") => {
const content = ref(new Map())
const loading = ref(false)
@@ -12,7 +10,9 @@ export const useContentStore = (mapKey = 'id') => {
})
const getByKey = (key) => {
if (Array.isArray(key)) {
return key.map((k) => content.value.get(k)).filter((item) => item !== undefined)
return key
.map((k) => content.value.get(k))
.filter((item) => item !== undefined)
}
return content.value.get(key)
}
@@ -21,7 +21,7 @@ export const useContentStore = (mapKey = 'id') => {
// Actions
function set(items) {
content.value = new Map
content.value = new Map()
save(items)
}
@@ -33,7 +33,7 @@ export const useContentStore = (mapKey = 'id') => {
})
}
function remove(item) {
content.value.delete( typeof item === 'object' ? item[mapKey] : item)
content.value.delete(typeof item === "object" ? item[mapKey] : item)
}
function startLoading() {
@@ -60,6 +60,6 @@ export const useContentStore = (mapKey = 'id') => {
remove,
startLoading,
stopLoading,
resetState
resetState,
}
}