fix: instance redirects to root page with / making it appear as a sub-page in navigation (#6040)

This commit is contained in:
Prospector
2026-05-08 12:54:25 -07:00
committed by GitHub
parent a082e8597c
commit 384556a810
2 changed files with 4 additions and 4 deletions

View File

@@ -149,7 +149,7 @@ const handleOptionsClick = async (args) => {
break break
case 'edit': case 'edit':
await router.push({ await router.push({
path: `/instance/${encodeURIComponent(args.item.path)}/`, path: `/instance/${encodeURIComponent(args.item.path)}`,
}) })
break break
case 'duplicate': case 'duplicate':

View File

@@ -486,7 +486,7 @@ export function createContentInstall(opts: {
if (!id) return if (!id) return
await add_project_from_version(id, version.id, 'standalone') await add_project_from_version(id, version.id, 'standalone')
await opts.router.push(`/instance/${encodeURIComponent(id)}/`) await opts.router.push(`/instance/${encodeURIComponent(id)}`)
const instance = await get(id) const instance = await get(id)
await installVersionDependencies(instance, version, 'dependency') await installVersionDependencies(instance, version, 'dependency')
@@ -513,7 +513,7 @@ export function createContentInstall(opts: {
function handleNavigate(instance: ContentInstallInstance) { function handleNavigate(instance: ContentInstallInstance) {
modalRef?.hide() modalRef?.hide()
opts.router.push(`/instance/${encodeURIComponent(instance.id)}/`) opts.router.push(`/instance/${encodeURIComponent(instance.id)}`)
} }
function handleCancel() { function handleCancel() {
@@ -666,7 +666,7 @@ export function createContentInstall(opts: {
}, },
handleModpackDuplicateGoToInstance(instancePath: string) { handleModpackDuplicateGoToInstance(instancePath: string) {
pendingModpackInstall = null pendingModpackInstall = null
opts.router.push(`/instance/${encodeURIComponent(instancePath)}/`) opts.router.push(`/instance/${encodeURIComponent(instancePath)}`)
}, },
setIncompatibilityWarningModal(ref: IncompatibilityWarningModalRef) { setIncompatibilityWarningModal(ref: IncompatibilityWarningModalRef) {
incompatibilityWarningModalRef = ref incompatibilityWarningModalRef = ref