chore: fix view shortcut activity

This commit is contained in:
Steven
2023-12-18 08:44:56 +08:00
parent aa1351f815
commit 47346182f0
12 changed files with 228 additions and 144 deletions

View File

@ -32,7 +32,6 @@ const CollectionSpace = () => {
(async () => {
try {
const collection = await collectionStore.fetchCollectionByName(collectionName);
await userStore.getOrFetchUserById(collection.creatorId);
setCollection(collection);
setShortcuts([]);
for (const shortcutId of collection.shortcutIds) {

View File

@ -13,7 +13,7 @@ const ShortcutSpace = () => {
useEffect(() => {
(async () => {
try {
await shortcutStore.getOrFetchShortcutByName(shortcutName);
await shortcutStore.getOrFetchShortcutByName(shortcutName, true);
} catch (error: any) {
console.error(error);
toast.error(error.details);
@ -26,6 +26,7 @@ const ShortcutSpace = () => {
}
if (isURL(shortcut.link)) {
window.document.title = "Redirecting...";
window.location.href = shortcut.link;
return null;
}