fix: Mobile QA — manual tasks + remittance review (FIBEROPS-207-208)

- manual-tasks/[id].tsx: use r.data?.data ?? r.data for detail query to
  handle API response wrapper envelope, matching list screen pattern
- remittances/[id].tsx: same fix — detail query now unwraps correctly
- services/api.ts: use STORAGE_KEYS.TOKEN constant instead of hardcoded
  string literals in SecureStore calls
This commit is contained in:
2026-04-01 01:01:59 +00:00
parent 95d2510b23
commit 7d82ddc316
3 changed files with 4 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ export const api = axios.create({
});
api.interceptors.request.use(async (config) => {
const token = await SecureStore.getItemAsync('fiberops_token');
const token = await SecureStore.getItemAsync(STORAGE_KEYS.TOKEN);
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
@@ -22,7 +22,7 @@ api.interceptors.response.use(
(response) => response,
async (error) => {
if (error.response?.status === 401) {
await SecureStore.deleteItemAsync('fiberops_token');
await SecureStore.deleteItemAsync(STORAGE_KEYS.TOKEN);
await SecureStore.deleteItemAsync('fiberops_tenant');
}
return Promise.reject(error);