mirror of
https://github.com/Sevichecc/raycast-akkoma-extension.git
synced 2025-04-30 22:49:30 +08:00
refactor: add utils files
This commit is contained in:
parent
190b7a75af
commit
b3140f1a0e
4 changed files with 1 additions and 1 deletions
|
@ -26,8 +26,8 @@ export default function BookmarkCommand() {
|
||||||
showToast(Toast.Style.Animated, "Loading bookmarks...");
|
showToast(Toast.Style.Animated, "Loading bookmarks...");
|
||||||
const newBookmarks = await apiServer.fetchBookmarks();
|
const newBookmarks = await apiServer.fetchBookmarks();
|
||||||
setBookmarks(newBookmarks);
|
setBookmarks(newBookmarks);
|
||||||
cache.set("latest_bookmarks", JSON.stringify(newBookmarks));
|
|
||||||
showToast(Toast.Style.Success, "Bookmarked has been loaded");
|
showToast(Toast.Style.Success, "Bookmarked has been loaded");
|
||||||
|
cache.set("latest_bookmarks", JSON.stringify(newBookmarks));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const requestErr = error as AkkomaError;
|
const requestErr = error as AkkomaError;
|
||||||
showToast(Toast.Style.Failure, "Error", requestErr.message);
|
showToast(Toast.Style.Failure, "Error", requestErr.message);
|
||||||
|
|
Loading…
Reference in a new issue