Skip to content

Commit

Permalink
added adds
Browse files Browse the repository at this point in the history
  • Loading branch information
indresh149 committed Apr 26, 2024
1 parent d3936e0 commit c64d44e
Show file tree
Hide file tree
Showing 12 changed files with 495 additions and 501 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/expensetracker.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"colorWheel.settings.workspaceColor": "hsl(274,14%,47%)"
}
7 changes: 7 additions & 0 deletions app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// <project-root>/app.config.js
module.exports = {
'react-native-google-mobile-ads': {
android_app_id: 'ca-app-pub-1123677122450039~1476527684',
},
};

6 changes: 5 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@
"web": {
"favicon": "./assets/favicon.png"
},
"react-native-google-mobile-ads": {
"android_app_id": "ca-app-pub-7178411625478900389~9063717869"
},
"extra": {
"eas": {
"projectId": "30868ac6-0d1e-41eb-a46b-8ff4e5b055dd"
"projectId": "ca-app-pub-1123677122450039~1476527684"
}
}
}
}

13 changes: 13 additions & 0 deletions components/ExpensesOutput/ExpensesOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ 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';

import { AdsConsentInterface } from "react-native-google-mobile-ads";

let AdsConsent= undefined;

if (isExpoGo) {
AdsConsent = require("react-native-google-mobile-ads").AdsConsent;
}

function ExpensesOutput({ expenses, expensesPeriod, fallbackText }) {
let content = <Text style={styles.infoText}>{fallbackText}</Text>;
Expand All @@ -18,6 +27,10 @@ function ExpensesOutput({ expenses, expensesPeriod, fallbackText }) {
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 }]}
Expand Down
Loading

0 comments on commit c64d44e

Please sign in to comment.