Skip to content

Commit

Permalink
chore: remove unused system settings code
Browse files Browse the repository at this point in the history
  • Loading branch information
nextchamp-saqib committed Nov 29, 2023
1 parent 6e8961d commit cbb3326
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions frontend/src/stores/settingsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,15 @@ type InsightsSettings = {

const settingsStore = defineStore('insights:settings', () => {
const insightsSettings = api.getDocumentResource('Insights Settings')
const systemSettings = api.getDocumentResource('System Settings')

const initialized = computed(() => insightsSettings.doc?.name && systemSettings.doc?.name)
const initialized = computed(() => insightsSettings.doc?.name)
async function initialize() {
if (initialized.value) return
await insightsSettings.get.fetch()
await systemSettings.get.fetch()
}

const loading = computed(() => insightsSettings.loading || systemSettings.loading)

const loading = computed(() => insightsSettings.loading)
const settings = computed({
get() {
return {
...(insightsSettings.doc || {}),
...(systemSettings.doc || {}),
}
},
get: () => insightsSettings.doc,
set(value: InsightsSettings) {
insightsSettings.doc = value
},
Expand Down

0 comments on commit cbb3326

Please sign in to comment.