@@ -18,6 +18,7 @@ import { Dropdown, Input } from '@/components';
18
18
import { PostDetailValue } from '@/types' ;
19
19
import { useResponsive } from '@/hooks' ;
20
20
import { postDetail } from '@/apis' ;
21
+ import { convertDateToKST } from '@/utils' ;
21
22
22
23
ChartJS . register ( CategoryScale , LinearScale , PointElement , LineElement , Title , Tooltip , Legend ) ;
23
24
@@ -50,7 +51,7 @@ export const Graph = ({ id, releasedAt }: IProp) => {
50
51
queryKey : [ PATHS . DETAIL , type , id ] ,
51
52
queryFn : async ( ) => await postDetail ( id , type . start , type . end ) ,
52
53
select : ( { post } ) => ( {
53
- labels : post . map ( ( i ) => i . date . split ( 'T' ) [ 0 ] ) ,
54
+ labels : post . map ( ( i ) => convertDateToKST ( i . date ) ?. short ) ,
54
55
datasets : [
55
56
{
56
57
label : type . type ,
@@ -87,7 +88,7 @@ export const Graph = ({ id, releasedAt }: IProp) => {
87
88
size = { isMBI ? 'SMALL' : 'MEDIUM' }
88
89
form = "SMALL"
89
90
value = { type . start }
90
- min = { releasedAt . split ( 'T' ) [ 0 ] }
91
+ min = { convertDateToKST ( releasedAt ) ?. short }
91
92
onChange = { ( e ) => setType ( { ...type , start : e . target . value } ) }
92
93
placeholder = "시작 날짜"
93
94
type = "date"
@@ -97,7 +98,7 @@ export const Graph = ({ id, releasedAt }: IProp) => {
97
98
size = { isMBI ? 'SMALL' : 'MEDIUM' }
98
99
form = "SMALL"
99
100
value = { type . end }
100
- min = { type . start ? type . start : releasedAt . split ( 'T' ) [ 0 ] }
101
+ min = { type . start ? type . start : convertDateToKST ( releasedAt ) ?. short }
101
102
onChange = { ( e ) => setType ( { ...type , end : e . target . value } ) }
102
103
placeholder = "종료 날짜"
103
104
type = "date"
0 commit comments