From 543aa0cd4a461285298d33a90ab3f11a9f084ca5 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Wed, 13 Mar 2024 00:17:32 +0000 Subject: Add home page --- utils/util.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'utils') diff --git a/utils/util.ts b/utils/util.ts index cc500e0..273191a 100644 --- a/utils/util.ts +++ b/utils/util.ts @@ -4,17 +4,19 @@ export function stripColorCodes(str: string): string { return str.replace(COLOR_CODE_REGEX, ''); } -export function navigateToEditorPane(type: 'quest' | 'category' | 'item' | null, id?: string) { +export function navigateToEditorPane(type: 'quest' | 'category' | 'item' | 'config' | null, id?: string) { if (id) { if (type === 'category') { - navigateTo({ path: '/category/' + id }) + navigateTo({ path: '/editor/category/' + id }) } else if (type === 'quest') { - navigateTo({ path: '/quest/' + id }) + navigateTo({ path: '/editor/quest/' + id }) } else if (type === 'item') { - navigateTo({ path: '/item/' + id }) + navigateTo({ path: '/editor/item/' + id }) } + } else if (type === 'config') { + navigateTo({ path: '/editor/config' }) } else if (!id && !type) { - navigateTo({ path: '/' }) + navigateTo({ path: '/editor' }) } } -- cgit v1.2.3-70-g09d2