chore: fix create shortcut view activity

This commit is contained in:
Steven
2023-12-24 00:22:03 +08:00
parent 546d87ca0b
commit 9259a85e69
12 changed files with 282 additions and 195 deletions

View File

@ -34,7 +34,7 @@ const useShortcutStore = create(
}
return shortcut;
},
getOrFetchShortcutById: async (id: number, recordView = false) => {
getOrFetchShortcutById: async (id: number) => {
const shortcutMap = get().shortcutMapById;
if (shortcutMap[id]) {
return shortcutMap[id] as Shortcut;
@ -42,7 +42,6 @@ const useShortcutStore = create(
const { shortcut } = await shortcutServiceClient.getShortcut({
id,
recordView,
});
if (!shortcut) {
throw new Error(`Shortcut with id ${id} not found`);