Skip to content

Commit f69d4f2

Browse files
committed
ad
1 parent 34ee0c0 commit f69d4f2

File tree

4 files changed

+1
-55
lines changed

4 files changed

+1
-55
lines changed

Govt-Billing-React/.env.example

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ VITE_FIREBASE_AUTH_DOMAIN="domain_name.firebaseapp.com"
44
VITE_FIREBASE_PROJECT_ID="project_id"
55
VITE_FIREBASE_STORAGE_BUCKET="storage_bucket"
66
VITE_FIREBASE_MESSAGING_SENDER_ID="sender_id"
7-
VITE_FIREBASE_APP_ID="firebase_app_id"
8-
IOS_AD_ID=
9-
ANDROID_AD_ID=
7+
VITE_FIREBASE_APP_ID="firebase_app_id"

Govt-Billing-React/package-lock.json

-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Govt-Billing-React/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"generate-pwa-assets": "pwa-assets-generator"
1414
},
1515
"dependencies": {
16-
"@capacitor-community/admob": "^6.0.0",
1716
"@capacitor/android": "5.7.0",
1817
"@capacitor/app": "5.0.7",
1918
"@capacitor/core": "5.7.0",

Govt-Billing-React/src/pages/Home.tsx

-31
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ import Menu from "../components/Menu/Menu";
2222
import Files from "../components/Files/Files";
2323
import NewFile from "../components/NewFile/NewFile";
2424
import { initFirebase } from "../firebase/index";
25-
import {
26-
AdMob,
27-
BannerAdOptions,
28-
BannerAdPosition,
29-
BannerAdSize,
30-
} from "@capacitor-community/admob";
3125

3226
const Home: React.FC = () => {
3327
const [showMenu, setShowMenu] = useState(false);
@@ -41,31 +35,6 @@ const Home: React.FC = () => {
4135

4236
initFirebase();
4337

44-
const initAdmob = async () => {
45-
const { status } = await AdMob.trackingAuthorizationStatus();
46-
AdMob.initialize({
47-
initializeForTesting: true,
48-
});
49-
};
50-
51-
const showBanner = async () => {
52-
await initAdmob();
53-
const options: BannerAdOptions = {
54-
adId: isPlatform("ios")
55-
? process.env.IOS_AD_ID
56-
: process.env.ANDROID_AD_ID,
57-
adSize: BannerAdSize.ADAPTIVE_BANNER,
58-
position: BannerAdPosition.TOP_CENTER,
59-
margin: 0,
60-
isTesting: true,
61-
};
62-
63-
await AdMob.showBanner(options);
64-
};
65-
useEffect(() => {
66-
showBanner();
67-
}, []);
68-
6938
const store = new Local();
7039

7140
const closeMenu = () => {

0 commit comments

Comments
 (0)