Files
kiss-translator/src/hooks/Sync.js

12 lines
270 B
JavaScript
Raw Normal View History

2023-08-30 18:05:37 +08:00
import { STOKEY_SYNC, DEFAULT_SYNC } from "../config";
import { useStorage } from "./Storage";
2023-07-31 15:08:51 +08:00
/**
* sync hook
* @returns
*/
export function useSync() {
2023-08-30 18:05:37 +08:00
const { data, update } = useStorage(STOKEY_SYNC, DEFAULT_SYNC);
return { sync: data, updateSync: update };
2023-07-31 15:08:51 +08:00
}