File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ const ShowPage = () => {
9
9
const { id } = useParams ( ) ;
10
10
const [ post , setPost ] = useState ( null ) ;
11
11
const [ loading , setLoading ] = useState ( true ) ;
12
- const [ timer , setTimer ] = useState ( 0 ) ;
13
12
const isLoggedIn = useSelector ( state => state . auth . isLoggedIn ) ;
14
13
15
14
const getPost = ( id ) => {
@@ -19,17 +18,6 @@ const ShowPage = () => {
19
18
} )
20
19
} ;
21
20
22
- useEffect ( ( ) => {
23
- const interval = setInterval ( ( ) => {
24
- console . log ( 'hello' )
25
- setTimer ( prev => prev + 1 ) ;
26
- } , 1000 ) ;
27
-
28
- return ( ) => {
29
- clearInterval ( interval ) ;
30
- }
31
- } , [ ] ) ;
32
-
33
21
useEffect ( ( ) => {
34
22
getPost ( id )
35
23
} , [ id ] )
@@ -45,7 +33,7 @@ const ShowPage = () => {
45
33
return (
46
34
< div >
47
35
< div className = "d-flex" >
48
- < h1 className = "flex-grow-1" > { post . title } ( { timer } 초) </ h1 >
36
+ < h1 className = "flex-grow-1" > { post . title } </ h1 >
49
37
{ isLoggedIn && < div >
50
38
< Link
51
39
className = "btn btn-primary"
You can’t perform that action at this time.
0 commit comments