mirror of
https://github.com/ente-io/ente.git
synced 2025-05-24 12:09:17 +00:00
18 lines
319 B
TypeScript
18 lines
319 B
TypeScript
import { haveWindow } from "@/next/env";
|
|
|
|
import localForage from "localforage";
|
|
|
|
if (haveWindow()) {
|
|
localForage.config({
|
|
name: "ente-files",
|
|
version: 1.0,
|
|
storeName: "files",
|
|
});
|
|
}
|
|
|
|
export default localForage;
|
|
|
|
export const clearFiles = async () => {
|
|
await localForage.clear();
|
|
};
|