Skip to content

Commit 2205e48

Browse files
authored
Merge pull request #29 from Seol-JY/feature/clean-ads
feat: 광고 제거
2 parents c5a036f + a9bde9a commit 2205e48

File tree

5 files changed

+17
-125
lines changed

5 files changed

+17
-125
lines changed

client/public/index.html

-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
href="https://fonts.googleapis.com/icon?family=Material+Icons"
1818
rel="stylesheet"
1919
/>
20-
<script
21-
async
22-
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8658385917169302"
23-
crossorigin="anonymous"
24-
></script>
2520
<title>Speed Coder</title>
2621
</head>
2722
<body onpaste="return false">

client/src/App.js

+1-43
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { useState, useEffect } from "react";
99
import { Provider } from "react-redux";
1010
import store from "./redux/store";
1111
import Draggable from "react-draggable";
12-
import InFeedAdvertise from "./components/advertises/InFeedAdvertise";
1312

1413
function App() {
1514
const [section, setSection] = useState("1");
@@ -77,45 +76,6 @@ function App() {
7776

7877
return (
7978
<Provider store={store}>
80-
{/* <div
81-
style={{
82-
margin: "0",
83-
fontSize: "20px",
84-
position: "absolute",
85-
left: "calc(100vw/2 - 150px)",
86-
top: "calc(100vh/2 - 100px)",
87-
display: "flex",
88-
justifyContent: "space-around",
89-
alignItems: "center",
90-
height: "100px",
91-
width: "300px",
92-
backgroundColor: "var(--topbar-background-color)",
93-
borderRadius: "10px",
94-
transition: "background-color 0.3s",
95-
flexDirection: "column",
96-
}}
97-
>
98-
<h1 style={{ position: "static" }}>
99-
Number of clicks: {counterValue.toLocaleString("ko-KR")}
100-
</h1>
101-
{buttonClicked || (
102-
<button
103-
onClick={() => {
104-
increaseCounter();
105-
setButtonClicked(true);
106-
}}
107-
className="sidebarsection-list"
108-
style={{
109-
width: "120px",
110-
height: "40px",
111-
border: "0.8px solid darkgray",
112-
borderRadius: "10px",
113-
}}
114-
>
115-
Can you press it?
116-
</button>
117-
)}
118-
</div> */}
11979
<div
12080
style={{
12181
margin: "0 10px 0 0",
@@ -126,9 +86,7 @@ function App() {
12686
justifyContent: "space-around",
12787
alignItems: "center",
12888
}}
129-
>
130-
<InFeedAdvertise />
131-
</div>
89+
></div>
13290
<div className="scale-wrapper" style={{ transform: `scale(${scale})` }}>
13391
<Draggable onDrag={(e, data) => trackPos(data)}>
13492
<div className="form no-drag">

client/src/components/LeaderBoard.jsx

+16-31
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import fetcher from "../utils/fetcher";
22
import { useState, useEffect, useCallback } from "react";
33
import { useInView } from "react-intersection-observer";
44
import LeaderBoardContents from "./LeaderBoardContents";
5-
import InFeedAdvertise from "./advertises/InFeedAdvertise";
65

76
export default function LeaderBoard({ daynight }) {
87
const [prev, prevInView] = useInView(); // 무한 스크롤용 ref - 이전
@@ -63,40 +62,26 @@ export default function LeaderBoard({ daynight }) {
6362
</ul>
6463
) : (
6564
<ul className="sidebarsection-rank">
66-
{
67-
items.map((s, i) => {
68-
// if (i === 2) {
69-
// return (
70-
// <li key={s._id} ref={prev}>
71-
// <LeaderBoardContents s={s} />
72-
// </li>
73-
// );
74-
if (i === items.length - 1) {
75-
return (
76-
<li key={s._id} ref={next}>
77-
<LeaderBoardContents s={s} />
78-
</li>
79-
);
80-
}
65+
{items.map((s, i) => {
66+
// if (i === 2) {
67+
// return (
68+
// <li key={s._id} ref={prev}>
69+
// <LeaderBoardContents s={s} />
70+
// </li>
71+
// );
72+
if (i === items.length - 1) {
8173
return (
82-
<li key={s._id}>
74+
<li key={s._id} ref={next}>
8375
<LeaderBoardContents s={s} />
8476
</li>
8577
);
86-
})
87-
// 인피드 광고가 3번째에 삽입되어야 하나, 최소 width를 만족하지 못해 제거
88-
// .reduce((acc, curr, i) => {
89-
// if (i === 3) {
90-
// acc.push(
91-
// <li key="advertise">
92-
// <InFeedAdvertise />
93-
// </li>
94-
// );
95-
// }
96-
// acc.push(curr);
97-
// return acc;
98-
// }, [])
99-
}
78+
}
79+
return (
80+
<li key={s._id}>
81+
<LeaderBoardContents s={s} />
82+
</li>
83+
);
84+
})}
10085
{loading && (
10186
<li>
10287
<ul>

client/src/components/Sidebar.jsx

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { useEffect, useState } from "react";
22
import Debug from "./Debug";
33
import LeaderBoard from "./LeaderBoard";
44
import IconGenerator from "./IconGenerator";
5-
import InFeedAdvertise from "./advertises/InFeedAdvertise";
6-
75
export default function Sidebar(props) {
86
const [filestate, setFilestate] = useState("hello.py");
97
const filename = [

client/src/components/advertises/InFeedAdvertise.jsx

-44
This file was deleted.

0 commit comments

Comments
 (0)