BangSo/apps/mobile/lib/last-bot.ts

17 lines
381 B
TypeScript
Raw Normal View History

2026-09-01 16:51:19 +00:00
import * as SecureStore from "expo-secure-store";
const LAST_BOT_KEY = "rakazo.last_bot_id";
export async function saveLastBotId(botId: string) {
if (!botId.trim()) return;
await SecureStore.setItemAsync(LAST_BOT_KEY, botId);
}
export async function loadLastBotId() {
try {
return (await SecureStore.getItemAsync(LAST_BOT_KEY)) ?? "";
} catch {
return "";
}
}