This commit is contained in:
tapframe 2025-12-24 19:05:14 +05:30
parent 0165b1f987
commit 614597d1bd
2 changed files with 16 additions and 3 deletions

View file

@ -205,9 +205,22 @@ export const CampaignManager: React.FC = () => {
}, 350); // Wait for exit animation
}, []);
const handleAction = (action: CampaignAction) => {
const handleAction = useCallback((action: CampaignAction) => {
console.log('[CampaignManager] Action:', action);
};
if (action.type === 'navigate' && action.value) {
handleDismiss();
setTimeout(() => {
try {
(navigation as any).navigate(action.value);
} catch (error) {
console.warn('[CampaignManager] Navigation failed:', error);
}
}, 400);
} else if (action.type === 'link' && action.value) {
Linking.openURL(action.value);
}
}, [navigation, handleDismiss]);
if (!activeCampaign || !isVisible) return null;

View file

@ -1,7 +1,7 @@
import { mmkvStorage } from './mmkvStorage';
import { Platform } from 'react-native';
const DEV_URL = 'http://192.168.1.5:3000';
const DEV_URL = 'https://campaign.nuvioapp.space/';
const PROD_URL = process.env.EXPO_PUBLIC_CAMPAIGN_API_URL || '';
const CAMPAIGN_API_URL = __DEV__ ? DEV_URL : PROD_URL;