mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-05 01:39:08 +00:00
SDUI fix
This commit is contained in:
parent
0165b1f987
commit
614597d1bd
2 changed files with 16 additions and 3 deletions
|
|
@ -205,9 +205,22 @@ export const CampaignManager: React.FC = () => {
|
||||||
}, 350); // Wait for exit animation
|
}, 350); // Wait for exit animation
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleAction = (action: CampaignAction) => {
|
const handleAction = useCallback((action: CampaignAction) => {
|
||||||
console.log('[CampaignManager] Action:', action);
|
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;
|
if (!activeCampaign || !isVisible) return null;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { mmkvStorage } from './mmkvStorage';
|
import { mmkvStorage } from './mmkvStorage';
|
||||||
import { Platform } from 'react-native';
|
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 PROD_URL = process.env.EXPO_PUBLIC_CAMPAIGN_API_URL || '';
|
||||||
const CAMPAIGN_API_URL = __DEV__ ? DEV_URL : PROD_URL;
|
const CAMPAIGN_API_URL = __DEV__ ? DEV_URL : PROD_URL;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue