chore: package updates to try get android to build

Updated packages to latest expo beta
Updated some MMKV usages

Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
This commit is contained in:
Lance Chant
2025-09-02 08:15:04 +02:00
parent ccf27284f6
commit c335a3269e
11 changed files with 373 additions and 282 deletions

View File

@@ -91,7 +91,7 @@ export const sortByPreferenceAtom = atomWithStorage<SortPreference>(
storage.set(key, JSON.stringify(value));
},
removeItem: (key) => {
storage.delete(key);
storage.remove(key);
},
},
);
@@ -108,7 +108,7 @@ export const sortOrderPreferenceAtom = atomWithStorage<SortOrderPreference>(
storage.set(key, JSON.stringify(value));
},
removeItem: (key) => {
storage.delete(key);
storage.remove(key);
},
},
);

View File

@@ -16,7 +16,7 @@ interface LogEntry {
const mmkvStorage = createJSONStorage(() => ({
getItem: (key: string) => storage.getString(key) || null,
setItem: (key: string, value: string) => storage.set(key, value),
removeItem: (key: string) => storage.delete(key),
removeItem: (key: string) => storage.remove(key),
}));
const logsAtom = atomWithStorage("logs", [], mmkvStorage);
@@ -74,7 +74,7 @@ export const readFromLog = (): LogEntry[] => {
};
export const clearLogs = () => {
storage.delete("logs");
storage.remove("logs");
};
export function useLog() {

View File

@@ -1,5 +1,5 @@
import { MMKV } from "react-native-mmkv";
import { createMMKV } from "react-native-mmkv";
// Create a single MMKV instance following the official documentation
// https://github.com/mrousavy/react-native-mmkv
export const storage = new MMKV();
export const storage = createMMKV();