File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
app/(with-tracker)/(auth-required)/main
components/auth-required/main/Section Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ import { useSearchParam } from '@/hooks/useSearchParam';
1717
1818const sorts : Array < OptionType > = [
1919 [ '작성일순' , '' ] ,
20- [ '조회순' , 'daily_view_count ' ] ,
21- [ '좋아요순' , 'daily_like_count ' ] ,
20+ [ '조회순' , 'dailyViewCount ' ] ,
21+ [ '좋아요순' , 'dailyLikeCount ' ] ,
2222] ;
2323
2424export const Content = ( ) => {
@@ -33,7 +33,7 @@ export const Content = () => {
3333 { asc : searchParams . asc === 'true' , sort : searchParams . sort || '' } ,
3434 pageParam ,
3535 ) ,
36- getNextPageParam : ( lastPage ) => lastPage . nextCursor ,
36+ getNextPageParam : ( lastPage ) => Number ( lastPage . nextCursor . split ( ',' ) [ 1 ] ) ,
3737 getPreviousPageParam : ( ) => 0 ,
3838 initialPageParam : undefined ,
3939 } ) ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export const Graph = ({ id }: IProp) => {
6060 const [ type , setType ] = useState ( {
6161 start : '' ,
6262 end : '' ,
63- type : 'view ' ,
63+ type : 'View ' ,
6464 } ) ;
6565
6666 const { data : datas } = useQuery ( {
@@ -72,7 +72,7 @@ export const Graph = ({ id }: IProp) => {
7272 {
7373 label : type . type ,
7474 data : post . map (
75- ( i ) => i [ `daily_ ${ type . type } _count ` as keyof PostDetailValue ] ,
75+ ( i ) => i [ `daily ${ type . type } Count ` as keyof PostDetailValue ] ,
7676 ) ,
7777 ...datasets ,
7878 } ,
@@ -108,8 +108,8 @@ export const Graph = ({ id }: IProp) => {
108108 onChange = { ( e ) => setType ( { ...type , type : e as string } ) }
109109 defaultValue = { '조회수' }
110110 options = { [
111- [ '조회수' , 'view ' ] ,
112- [ '좋아요' , 'like ' ] ,
111+ [ '조회수' , 'View ' ] ,
112+ [ '좋아요' , 'Like ' ] ,
113113 ] }
114114 />
115115 </ div >
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ export type PostSummaryDto = {
2727
2828export type PostDetailValue = {
2929 date : string ;
30- daily_view_count : number ;
31- daily_like_count : number ;
30+ dailyViewCount : number ;
31+ dailyLikeCount : number ;
3232} ;
3333
3434export type PostDetailDto = {
You can’t perform that action at this time.
0 commit comments