12 lines
317 B
JavaScript
12 lines
317 B
JavaScript
import { AsyncStorage } from 'react-native';
|
|
import settings from '../settings/constants';
|
|
|
|
async function get() {
|
|
return await AsyncStorage.getItem(settings.get('STORAGE_KEY'));
|
|
}
|
|
|
|
async function set(token) {
|
|
return await AsyncStorage.setItem(settings.get('STORAGE_KEY'), token);
|
|
}
|
|
|
|
export default { get, set };
|