feat: add log function
This commit is contained in:
@@ -3,6 +3,7 @@ import FavoriteIcon from "@mui/icons-material/Favorite";
|
||||
import FavoriteBorderIcon from "@mui/icons-material/FavoriteBorder";
|
||||
import { useState } from "react";
|
||||
import { useFavWords } from "../../hooks/FavWords";
|
||||
import { kissLog } from "../../libs/log";
|
||||
|
||||
export default function FavBtn({ word }) {
|
||||
const { favWords, toggleFav } = useFavWords();
|
||||
@@ -13,7 +14,7 @@ export default function FavBtn({ word }) {
|
||||
setLoading(true);
|
||||
await toggleFav(word);
|
||||
} catch (err) {
|
||||
console.log("[set fav]", err);
|
||||
kissLog(err, "set fav");
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import { sleep, limitNumber } from "../../libs/utils";
|
||||
import { isGm, isExt } from "../../libs/client";
|
||||
import { MSG_OPEN_TRANBOX, DEFAULT_TRANBOX_SHORTCUT } from "../../config";
|
||||
import { isMobile } from "../../libs/mobile";
|
||||
import { kissLog } from "../../libs/log";
|
||||
|
||||
export default function Slection({
|
||||
contextMenuType,
|
||||
@@ -127,7 +128,7 @@ export default function Slection({
|
||||
});
|
||||
};
|
||||
} catch (err) {
|
||||
console.log("[registerMenuCommand]", err);
|
||||
kissLog(err, "registerMenuCommand");
|
||||
}
|
||||
}, [handleTranbox, contextMenuType]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user