refactor: move task components to components/task/
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { ref } from "vue"
|
||||
import { useStorage } from "@vueuse/core"
|
||||
import { TASK_TYPE } from "../utils/const"
|
||||
|
||||
const currentTask = window.location.pathname.startsWith("/challenge")
|
||||
@@ -7,4 +8,4 @@ const currentTask = window.location.pathname.startsWith("/challenge")
|
||||
|
||||
export const taskTab = ref(currentTask)
|
||||
export const taskId = ref(0)
|
||||
export const challengeDisplay = ref(0)
|
||||
export const challengeDisplay = useStorage("challenge-display", 0)
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { useStorage } from "@vueuse/core"
|
||||
import { ref } from "vue"
|
||||
|
||||
const urlParams = new URLSearchParams(window.location.search)
|
||||
const currentStep = urlParams.get("step") ?? "1"
|
||||
|
||||
export const step = ref(Number(currentStep))
|
||||
export const step = useStorage("tutorial-step", 1)
|
||||
export const tutorialIds = ref<number[]>([])
|
||||
|
||||
export function prevDisabled(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user