401 auto re-login, My Location via native GPS, edge-to-edge, brain-car icon
- Client: onUnauthorized hook; 401 clears the token and (in-app) bounces to sign-in - Map: "My location" uses the native UserLocation fix + flyTo; safe-area insets on the floating status bar / controls - Enable edgeToEdgeEnabled (Android 15 forces it) so headers/back-arrow sit correctly - App icon: brain-car launcher + adaptive icon Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
b31cb78592
commit
65e9118806
9 changed files with 66 additions and 8 deletions
|
|
@ -43,6 +43,8 @@ export interface ParkSmarterClientOptions {
|
|||
/** Provide a fetch impl for React Native / Node < 18 / tests. */
|
||||
fetchImpl?: typeof fetch;
|
||||
uuid?: () => string;
|
||||
/** Called when any authenticated request returns 401 (token cleared automatically). */
|
||||
onUnauthorized?: () => void;
|
||||
}
|
||||
|
||||
function resolveEnvironment(
|
||||
|
|
@ -66,6 +68,7 @@ export class ParkSmarterClient {
|
|||
timeoutMs: options.timeoutMs,
|
||||
fetchImpl: options.fetchImpl,
|
||||
uuid: options.uuid,
|
||||
onUnauthorized: options.onUnauthorized,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue