import AsyncStorage from '@react-native-async-storage/async-storage'; const TOKEN_KEY = 'cnapp.authToken'; export async function getStoredToken(): Promise { return AsyncStorage.getItem(TOKEN_KEY); } export async function setStoredToken(token: string | null): Promise { if (token === null) { await AsyncStorage.removeItem(TOKEN_KEY); } else { await AsyncStorage.setItem(TOKEN_KEY, token); } }