You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
864 B

2 years ago
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'
2 years ago
const adUnitId = __DEV__ ? TestIds.INTERSTITIAL : 'ca-app-pub-4145771316565790/1848957462'
2 years ago
const screen = Dimensions.get("window")
const styles = StyleSheet.create({
container: {
2 years ago
//backgroundColor: colors.yellow,
2 years ago
flex: 1,
alignItems: "center",
justifyContent: "center",
marginTop: 20,
2 years ago
height: 100,
width: "100%"
}
2 years ago
})
export const Banner = () => {
let banner
if(__DEV__) {
banner = <Text>DEV BANNER</Text>
} else {
2 years ago
banner = <BannerAd size={BannerAdSize.LARGE_BANNER} unitId={adUnitId} />
}
2 years ago
return (
<View style={styles.container}>
{banner}
2 years ago
</View>
)
}