File tree Expand file tree Collapse file tree 5 files changed +10
-231
lines changed
my-activities/activity-edit/[id]
booking-detail/libs/hooks
my/activity-edit/components
shared/components/form-input Expand file tree Collapse file tree 5 files changed +10
-231
lines changed Original file line number Diff line number Diff line change 1- import { ParamValue } from 'next/dist/server/request/params' ;
2-
31import ActivityEditForm from '@/features/my/activity-edit/components/activity-edit-form' ;
42
5- const ActivityEditPage = async ( { params } : { params : { id : ParamValue } } ) => {
6- const activityId = params . id ;
3+ const ActivityEditPage = async ( {
4+ params,
5+ } : {
6+ params : Promise < { id : string } > ;
7+ } ) => {
8+ const { id : activityId } = await params ;
79 return (
810 < main >
911 < div className = "my-[1rem] flex w-full gap-[0.4rem]" >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export const useBookingQuery = (params?: GetBookingParams) => {
88 queryKey : [ 'booking' , params ] ,
99 queryFn : ( ) => getBooking ( params ) ,
1010 staleTime : 1000 * 60 * 60 * 2 , // 2μκ°
11- cacheTime : 1000 * 60 * 60 * 24 , // 24μκ°
11+ gcTime : 1000 * 60 * 60 * 24 , // 24μκ°
1212 retry : 1 ,
1313 } ) ;
1414} ;
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ const ActivityEditForm = ({ activityId }: ActivityEditFormProps) => {
9292 category : data . category ,
9393 description : data . description ,
9494 address : data . address ,
95- price : String ( data . price ) , // formInput μμ νμν΄λ³΄μ
95+ price : Number ( data . price ) ,
9696 bannerImages : data . bannerImageUrl ,
9797 subImages : data . subImages . map ( ( img ) => img . imageUrl ) ,
9898 schedules : data . schedules . map ( ( schedule ) => ( {
Original file line number Diff line number Diff line change @@ -126,10 +126,10 @@ export const FormInput = <T extends FieldValues>({
126126 placeholder = { placeholder }
127127 { ...register ( name , {
128128 setValueAs : ( value ) => {
129- if ( ! value || value . trim ( ) === '' ) {
129+ if ( ! value || String ( value ) . trim ( ) === '' ) {
130130 return undefined ;
131131 }
132- const num = parseInt ( value , 10 ) ;
132+ const num = parseInt ( String ( value ) , 10 ) ;
133133 return isNaN ( num ) ? undefined : num ;
134134 } ,
135135 } ) }
You canβt perform that action at this time.
0 commit comments