@@ -9,6 +9,7 @@ import { useState, useEffect } from "react";
9
9
import { Provider } from "react-redux" ;
10
10
import store from "./redux/store" ;
11
11
import Draggable from "react-draggable" ;
12
+ import InFeedAdvertise from "./components/advertises/InFeedAdvertise" ;
12
13
13
14
function App ( ) {
14
15
const [ section , setSection ] = useState ( "1" ) ;
@@ -24,36 +25,36 @@ function App() {
24
25
const [ counterValue , setCounterValue ] = useState ( 0 ) ;
25
26
26
27
useEffect ( ( ) => {
27
- fetchCounterValue ( ) ;
28
+ // fetchCounterValue();
28
29
egg ( ) ;
29
30
} , [ ] ) ;
30
31
31
- const fetchCounterValue = async ( ) => {
32
- try {
33
- const response = await fetch ( "/counter" ) ;
34
- if ( ! response . ok ) {
35
- throw new Error ( "Failed to fetch counter value" ) ;
36
- }
37
- const data = await response . json ( ) ;
38
- setCounterValue ( data . value ) ;
39
- } catch ( error ) {
40
- console . error ( "Failed to fetch counter value:" , error ) ;
41
- }
42
- } ;
43
- const increaseCounter = async ( ) => {
44
- try {
45
- const response = await fetch ( `/counter?amount=${ 1 } ` , {
46
- method : "POST" ,
47
- } ) ;
48
- if ( ! response . ok ) {
49
- throw new Error ( "Failed to increase counter value" ) ;
50
- }
51
- setCounterValue ( ( prevValue ) => prevValue + 1 ) ;
52
- setButtonClicked ( true ) ;
53
- } catch ( error ) {
54
- console . error ( "Failed to increase counter value:" , error ) ;
55
- }
56
- } ;
32
+ // const fetchCounterValue = async () => {
33
+ // try {
34
+ // const response = await fetch("/counter");
35
+ // if (!response.ok) {
36
+ // throw new Error("Failed to fetch counter value");
37
+ // }
38
+ // const data = await response.json();
39
+ // setCounterValue(data.value);
40
+ // } catch (error) {
41
+ // console.error("Failed to fetch counter value:", error);
42
+ // }
43
+ // };
44
+ // const increaseCounter = async () => {
45
+ // try {
46
+ // const response = await fetch(`/counter?amount=${1}`, {
47
+ // method: "POST",
48
+ // });
49
+ // if (!response.ok) {
50
+ // throw new Error("Failed to increase counter value");
51
+ // }
52
+ // setCounterValue((prevValue) => prevValue + 1);
53
+ // setButtonClicked(true);
54
+ // } catch (error) {
55
+ // console.error("Failed to increase counter value:", error);
56
+ // }
57
+ // };
57
58
58
59
const handleResize = ( ) => {
59
60
setScale ( Math . min ( window . innerWidth / 1400 , window . innerHeight / 900 ) ) ;
@@ -115,6 +116,19 @@ function App() {
115
116
</button>
116
117
)}
117
118
</div> */ }
119
+ < div
120
+ style = { {
121
+ margin : "0 10px 0 0" ,
122
+ position : "absolute" ,
123
+ right : "0" ,
124
+ top : "calc(100vh/2 - 250px)" ,
125
+ display : "flex" ,
126
+ justifyContent : "space-around" ,
127
+ alignItems : "center" ,
128
+ } }
129
+ >
130
+ < InFeedAdvertise />
131
+ </ div >
118
132
< div className = "scale-wrapper" style = { { transform : `scale(${ scale } )` } } >
119
133
< Draggable onDrag = { ( e , data ) => trackPos ( data ) } >
120
134
< div className = "form no-drag" >
0 commit comments