|
|
|
import React from "react"
|
|
|
|
import { View, StyleSheet, StatusBar, Text, Dimensions } from "react-native"
|
|
|
|
import { colors, texts, credentials } from "./Variables"
|
|
|
|
|
|
|
|
import { BannerAd, BannerAdSize, TestIds } from 'react-native-google-mobile-ads'
|
|
|
|
const adUnitId = __DEV__ ? TestIds.INTERSTITIAL : 'ca-app-pub-4145771316565790/1848957462'
|
|
|
|
|
|
|
|
const screen = Dimensions.get("window")
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
//backgroundColor: colors.yellow,
|
|
|
|
flex: 1,
|
|
|
|
alignItems: "center",
|
|
|
|
justifyContent: "center",
|
|
|
|
marginTop: 20,
|
|
|
|
height: 100,
|
|
|
|
width: "100%"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
export const Banner = () => {
|
|
|
|
|
|
|
|
let banner
|
|
|
|
|
|
|
|
if(__DEV__) {
|
|
|
|
banner = <Text>DEV BANNER</Text>
|
|
|
|
} else {
|
|
|
|
banner = <BannerAd size={BannerAdSize.LARGE_BANNER} unitId={adUnitId} />
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
<View style={styles.container}>
|
|
|
|
{banner}
|
|
|
|
</View>
|
|
|
|
)
|
|
|
|
}
|