Correction secure store

This commit is contained in:
2024-12-09 22:57:59 +01:00
parent 4be37ac303
commit 1f4cfe0b77
5 changed files with 23 additions and 22 deletions

View File

@ -1,3 +0,0 @@
import * as SecureStore from 'expo-secure-store'
export default SecureStore

View File

@ -1,17 +1,3 @@
export function getItem(key: string): string | null {
return localStorage.getItem(key)
}
import { getItem, getItemAsync, setItem, setItemAsync } from 'expo-secure-store'
export async function getItemAsync(key: string): Promise<string | null> {
return localStorage.getItem(key)
}
export function setItem(key: string, value: string): void {
localStorage.setItem(key, value)
}
export async function setItemAsync(key: string, value: string): Promise<void> {
localStorage.setItem(key, value)
}
export default { getItem, getItemAsync, setItem, setItemAsync }
export { getItem, getItemAsync, setItem, setItemAsync }

View File

@ -0,0 +1,15 @@
export function getItem(key: string): string | null {
return localStorage.getItem(key)
}
export async function getItemAsync(key: string): Promise<string | null> {
return localStorage.getItem(key)
}
export function setItem(key: string, value: string): void {
localStorage.setItem(key, value)
}
export async function setItemAsync(key: string, value: string): Promise<void> {
localStorage.setItem(key, value)
}