forked from MapComplete/MapComplete
Refactoring: move functions out of Utils
This commit is contained in:
parent
442f5a2923
commit
5ea2414204
16 changed files with 126 additions and 145 deletions
|
|
@ -5,10 +5,12 @@
|
|||
import { TrashIcon } from "@babeard/svelte-heroicons/mini"
|
||||
import ShowConversionMessage from "./ShowConversionMessage.svelte"
|
||||
import Markdown from "../Base/Markdown.svelte"
|
||||
import type { QuestionableTagRenderingConfigJson } from "../../Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson"
|
||||
import type {
|
||||
QuestionableTagRenderingConfigJson
|
||||
} from "../../Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson"
|
||||
import CollapsedTagRenderingPreview from "./CollapsedTagRenderingPreview.svelte"
|
||||
import { Accordion } from "flowbite-svelte"
|
||||
import { Utils } from "../../Utils"
|
||||
import { Lists } from "../../Utils/Lists"
|
||||
|
||||
export let state: EditJsonState<any>
|
||||
export let path: (string | number)[] = []
|
||||
|
|
@ -39,7 +41,7 @@
|
|||
|
||||
let datapath = path
|
||||
const currentValue = state.getStoreFor<(string | QuestionableTagRenderingConfigJson)[]>(datapath)
|
||||
currentValue.set(Utils.DedupT(currentValue.data))
|
||||
currentValue.set(Lists.dedupT(currentValue.data))
|
||||
console.log("Current value is", currentValue.data)
|
||||
if (currentValue.data === undefined) {
|
||||
currentValue.setData([])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue