refactor
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { ref } from "vue"
|
||||
import { TASK_TYPE } from "../utils/const"
|
||||
|
||||
const urlParams = new URLSearchParams(window.location.search)
|
||||
const currentTask = (urlParams.get("task") as TASK_TYPE) ?? TASK_TYPE.Tutorial
|
||||
const currentTask = window.location.pathname.startsWith("/challenge")
|
||||
? TASK_TYPE.Challenge
|
||||
: TASK_TYPE.Tutorial
|
||||
|
||||
export const taskTab = ref(currentTask)
|
||||
export const taskId = ref(0)
|
||||
|
||||
Reference in New Issue
Block a user