feat: add log function

This commit is contained in:
Gabe Yuan
2024-03-19 18:07:18 +08:00
parent 1d9e9c1b7d
commit 6e927473b9
24 changed files with 76 additions and 41 deletions

View File

@@ -3,6 +3,7 @@ import { useCallback, useEffect, useState } from "react";
import { trySyncWords } from "../libs/sync";
import { getWordsWithDefault, setWords } from "../libs/storage";
import { useSyncMeta } from "./Sync";
import { kissLog } from "../libs/log";
export function useFavWords() {
const [loading, setLoading] = useState(false);
@@ -56,7 +57,7 @@ export function useFavWords() {
const favWords = await getWordsWithDefault();
setFavWords(favWords);
} catch (err) {
console.log("[query fav]", err);
kissLog(err, "query fav");
} finally {
setLoading(false);
}