From e167ec5a5a6d3f83f130cafe92f95fe358ef1b6c Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Sun, 24 Nov 2024 21:59:59 +0800 Subject: [PATCH] fix: BadWorkspacePath error now show workspace id to debug fixes #588 --- src/pages/Main/PageIconAndSelector/PageSelectorBase.tsx | 4 ++-- .../Main/WorkspaceIconAndSelector/WorkspaceSelectorBase.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Main/PageIconAndSelector/PageSelectorBase.tsx b/src/pages/Main/PageIconAndSelector/PageSelectorBase.tsx index 72a3538b..32d4358f 100644 --- a/src/pages/Main/PageIconAndSelector/PageSelectorBase.tsx +++ b/src/pages/Main/PageIconAndSelector/PageSelectorBase.tsx @@ -144,9 +144,9 @@ export function PageSelectorBase({ const [shortPageName, shortPageNameSetter] = useState(t('Loading')); useEffect(() => { void window.service.native.path('basename', pageName).then((baseName) => { - shortPageNameSetter(baseName ?? t('WorkspaceSelector.BadWorkspacePath')); + shortPageNameSetter(baseName ?? (id + t('WorkspaceSelector.BadWorkspacePath'))); }); - }, [pageName, t]); + }, [id, pageName, t]); return ( (t('Loading')); useEffect(() => { void window.service.native.path('basename', workspaceName).then((baseName) => { - shortWorkspaceNameSetter(baseName ?? t('WorkspaceSelector.BadWorkspacePath')); + shortWorkspaceNameSetter(baseName ?? (id + t('WorkspaceSelector.BadWorkspacePath'))); }); - }, [workspaceName, t]); + }, [workspaceName, t, id]); let icon = showSideBarIcon && (