Skip to content

Commit

Permalink
Add ad
Browse files Browse the repository at this point in the history
  • Loading branch information
PleatherStarfish committed Dec 2, 2024
1 parent be986bb commit a86926a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 78 deletions.
4 changes: 2 additions & 2 deletions backend/static/js/main.bundle.js

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions frontend/package-lock.json

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

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"proxy": "http://0.0.0.0:8000/",
"dependencies": {
"@ctrl/react-adsense": "^1.7.0",
"@headlessui/react": "^1.7.13",
"@heroicons/react": "^2.0.16",
"@react-hook/window-size": "^3.1.1",
Expand Down
38 changes: 0 additions & 38 deletions frontend/src/components/components/adSense/bannerAd.tsx

This file was deleted.

36 changes: 0 additions & 36 deletions frontend/src/components/components/adSense/inFeedAd.tsx

This file was deleted.

10 changes: 8 additions & 2 deletions frontend/src/projects/ModulesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from "react";
import chroma from "chroma-js";
import { motion } from "framer-motion";
import useAuthenticatedUser from "../services/useAuthenticatedUser";
import InFeedAd from "../components/components/adSense/inFeedAd";
import { Adsense } from '@ctrl/react-adsense';


interface ModulesListProps {
Expand Down Expand Up @@ -146,7 +146,13 @@ const ModulesList: React.FC<ModulesListProps> = ({ shouldAnimate, modules, filte
key={`ad-${index}`}
variants={slideInFromRight}
>
<InFeedAd />
<Adsense
client="ca-pub-1549230942850511"
format="auto"
responsive="true"
slot="6413550510"
style={{ display: 'block' }}
/>
</motion.div>
)}
</>
Expand Down

0 comments on commit a86926a

Please sign in to comment.