Headless Functionality
Error handling
import { LucraSDK, type LucraSDKError } from '@lucra-sports/lucra-react-native-sdk';
function handleLucraSDKError(e: LucraSDKError) {
switch (e.code) {
case 'notInitialized':
LucraSDK.present({ name: LucraSDK.FLOW.ONBOARDING });
break;
case 'unverified':
LucraSDK.present({ name: LucraSDK.FLOW.VERIFY_IDENTITY });
break;
case 'insufficientFunds':
LucraSDK.present({ name: LucraSDK.FLOW.ADD_FUNDS });
break;
case 'missingDemographicInformation':
LucraSDK.present({ name: LucraSDK.FLOW.DEMOGRAPHIC_COLLECTION });
break;
case 'apiError':
case 'locationError':
// Retry, show location permission prompt
break;
default:
console.warn('Lucra error', e);
}
}User Configuration
Configure User Properties
Required/Optional Fields
Logout
User Listener
Full Screen Flow Dismissed Listener
Last updated
