-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7794bd
commit e4f65e3
Showing
4 changed files
with
51 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
// <project-root>/app.config.js | ||
module.exports = { | ||
'react-native-google-mobile-ads': { | ||
android_app_id: 'ca-app-pub-1123677122450039~1476527684', | ||
}, | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
import { StyleSheet, View, Text, useWindowDimensions } from 'react-native'; | ||
import { useState, useRef } from 'react'; | ||
import Lottie from 'lottie-react-native' | ||
import { GlobalStyles } from '../../constants/styles'; | ||
import ExpensesList from './ExpensesList'; | ||
import ExpensesSummary from './ExpensesSummary'; | ||
import { BannerAd, BannerAdSize, TestIds } from 'react-native-google-mobile-ads'; | ||
import { StyleSheet, View, Text, useWindowDimensions } from "react-native"; | ||
import { useState, useRef } from "react"; | ||
import Lottie from "lottie-react-native"; | ||
import { GlobalStyles } from "../../constants/styles"; | ||
import ExpensesList from "./ExpensesList"; | ||
import ExpensesSummary from "./ExpensesSummary"; | ||
// import { BannerAd, BannerAdSize, TestIds } from 'react-native-google-mobile-ads'; | ||
|
||
const adUnitId = __DEV__ ? TestIds.ADAPTIVE_BANNER : 'ca-app-pub-xxxxxxxxxxxxx/yyyyyyyyyyyyyy'; | ||
// const adUnitId = __DEV__ ? TestIds.ADAPTIVE_BANNER : 'ca-app-pub-xxxxxxxxxxxxx/yyyyyyyyyyyyyy'; | ||
|
||
import { AdsConsentInterface } from "react-native-google-mobile-ads"; | ||
// import { AdsConsentInterface } from "react-native-google-mobile-ads"; | ||
|
||
let AdsConsent= undefined; | ||
// let AdsConsent= undefined; | ||
|
||
if (isExpoGo) { | ||
AdsConsent = require("react-native-google-mobile-ads").AdsConsent; | ||
} | ||
// if (isExpoGo) { | ||
// AdsConsent = require("react-native-google-mobile-ads").AdsConsent; | ||
// } | ||
|
||
function ExpensesOutput({ expenses, expensesPeriod, fallbackText }) { | ||
let content = <Text style={styles.infoText}>{fallbackText}</Text>; | ||
let content = <Text style={styles.infoText}>{fallbackText}</Text>; | ||
|
||
if (expenses.length > 0) { | ||
content = <ExpensesList expenses={expenses} />; | ||
} | ||
if (expenses.length > 0) { | ||
content = <ExpensesList expenses={expenses} />; | ||
} | ||
|
||
const { height } = useWindowDimensions(); | ||
const animationRef = useRef(); | ||
return ( | ||
<View style={styles.container}> | ||
<BannerAd | ||
const { height } = useWindowDimensions(); | ||
const animationRef = useRef(); | ||
return ( | ||
<View style={styles.container}> | ||
{/* <BannerAd | ||
unitId={adUnitId} | ||
size={BannerAdSize.ANCHORED_ADAPTIVE_BANNER} | ||
/> | ||
<ExpensesSummary expenses={expenses} periodName={expensesPeriod} /> | ||
{content} | ||
<Lottie style={[styles.logo, { height: height * 0.3, marginLeft: 20 }]} | ||
ref={animationRef} | ||
//style = {{flex:1}} | ||
source={require('../../assets/animations/58861-piggy-bank-coins-out.json')} | ||
loop={true} | ||
autoPlay={true} | ||
|
||
//speed = {0.5} | ||
/> | ||
/> */} | ||
<ExpensesSummary expenses={expenses} periodName={expensesPeriod} /> | ||
{content} | ||
<Lottie | ||
style={[styles.logo, { height: height * 0.3, marginLeft: 20 }]} | ||
ref={animationRef} | ||
//style = {{flex:1}} | ||
source={require("../../assets/animations/58861-piggy-bank-coins-out.json")} | ||
loop={true} | ||
autoPlay={true} | ||
|
||
</View> | ||
); | ||
//speed = {0.5} | ||
/> | ||
</View> | ||
); | ||
} | ||
|
||
export default ExpensesOutput; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
paddingHorizontal: 24, | ||
paddingTop: 24, | ||
paddingBottom: 0, | ||
backgroundColor: GlobalStyles.colors.primary700 | ||
}, | ||
infoText: { | ||
color: 'white', | ||
fontSize: 16, | ||
textAlign: 'center', | ||
marginTop: 32, | ||
} | ||
}); | ||
container: { | ||
flex: 1, | ||
paddingHorizontal: 24, | ||
paddingTop: 24, | ||
paddingBottom: 0, | ||
backgroundColor: GlobalStyles.colors.primary700, | ||
}, | ||
infoText: { | ||
color: "white", | ||
fontSize: 16, | ||
textAlign: "center", | ||
marginTop: 32, | ||
}, | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters