Skip to content

Commit

Permalink
removed banner adds
Browse files Browse the repository at this point in the history
  • Loading branch information
indresh149 committed Apr 26, 2024
1 parent c7794bd commit e4f65e3
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 96 deletions.
7 changes: 1 addition & 6 deletions app.config.js
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',
},
};


100 changes: 50 additions & 50 deletions components/ExpensesOutput/ExpensesOutput.js
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,
},
});
39 changes: 0 additions & 39 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"lottie-react-native": "5.1.4",
"react": "18.2.0",
"react-native": "0.71.14",
"react-native-google-mobile-ads": "^13.2.0",
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "~3.20.0"
},
Expand Down

0 comments on commit e4f65e3

Please sign in to comment.