Skip to content

Commit da18261

Browse files
committed
Merge branch 'develop' into fix/139
2 parents fae304f + 4eac5f9 commit da18261

File tree

5 files changed

+32
-13
lines changed

5 files changed

+32
-13
lines changed

src/app/(with-header)/activities/[id]/components/ReviewSection.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { useQuery } from '@tanstack/react-query';
88
import { privateInstance } from '@/apis/privateInstance';
99
import ReviewTitle from './ReviewTitle';
1010
import useUserStore from '@/stores/authStore';
11+
import cn from '@/lib/cn';
1112

1213
import ReviewCardSkeleton from './Skeletons/ReviewCardSkeleton';
1314

@@ -58,11 +59,7 @@ function ReviewSection({
5859
key={review.id}
5960
userName={review.user.nickname}
6061
avatarSrc={review.user.profileImageUrl}
61-
date={new Date(review.createdAt).toLocaleDateString('ko-KR', {
62-
year: 'numeric',
63-
month: '2-digit',
64-
day: '2-digit',
65-
})}
62+
date={review.createdAt.slice(0, 10).replace(/-/g, '.')}
6663
reviewText={review.content}
6764
/>
6865
));
@@ -71,7 +68,7 @@ function ReviewSection({
7168
if (isLoading) {
7269
return (
7370
<div className='mt-10 flex flex-col space-y-8'>
74-
<div className='relative min-h-350 flex-col'>
71+
<div className='relative min-h-300 flex-col'>
7572
<ReviewTitle reviewCount={reviewCount} rating={rating} />
7673
{[...Array(3)].map((_, index) => (
7774
<ReviewCardSkeleton key={index} />
@@ -84,7 +81,7 @@ function ReviewSection({
8481
if (!reviewData || reviewData.reviews.length === 0) {
8582
return (
8683
<div className='mt-10 flex flex-col space-y-8'>
87-
<div className='relative min-h-350'>
84+
<div className='relative min-h-300'>
8885
<ReviewTitle reviewCount={reviewCount} rating={rating} />
8986

9087
<div className='pointer-events-none absolute inset-0 z-10 flex h-full items-center justify-center select-none'>
@@ -107,8 +104,10 @@ function ReviewSection({
107104
<div className='mt-10 flex flex-col space-y-8'>
108105
<ReviewTitle reviewCount={reviewCount} rating={rating} />
109106

110-
<div className='pointer-events-none relative min-h-350 select-none'>
111-
<div className={user ? '' : 'blur-sm'}>{ReviewComponent()}</div>
107+
<div className='pointer-events-none relative min-h-300 select-none'>
108+
<div className={cn(user ? '' : 'blur-sm', 'mt-10')}>
109+
{ReviewComponent()}
110+
</div>
112111

113112
{!user && (
114113
<div className='pointer-events-none absolute inset-0 z-10 flex h-full items-center justify-center select-none'>

src/app/(with-header)/myactivity/[id]/hooks/useEditActivityForm.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,29 @@ export const useEditActivityForm = () => {
141141
}
142142

143143
const newSchedules = dates.filter((d) => !d.id);
144+
144145
const scheduleIdsToRemove = originalSchedules
145146
.filter((orig) => !dates.some((d) => d.id === orig.id))
146-
.map((d) => d.id)
147-
.filter((id): id is number => id !== undefined);
147+
.map((d) => d.id!)
148+
.filter(Boolean);
149+
150+
originalSchedules.forEach((orig) => {
151+
const matched = dates.find((d) => d.id === orig.id);
152+
if (
153+
matched &&
154+
(matched.date !== orig.date ||
155+
matched.startTime !== orig.startTime ||
156+
matched.endTime !== orig.endTime)
157+
) {
158+
newSchedules.push({
159+
date: matched.date,
160+
startTime: matched.startTime,
161+
endTime: matched.endTime,
162+
});
163+
164+
scheduleIdsToRemove.push(orig.id!);
165+
}
166+
});
148167

149168
const parsedPrice = parseInt(price, 10);
150169
if (isNaN(parsedPrice) || parsedPrice <= 0) {

src/app/(with-header)/myactivity/components/InfoSection.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export function InfoSection({
3939
placeholder='제목'
4040
className='w-full'
4141
value={title}
42+
maxLength={20}
4243
onChange={(e) => onTitleChange(e.target.value)}
4344
/>
4445
</div>

src/components/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function Button({
4545
)}
4646
{...props}
4747
>
48-
{isLoading ? <span className='animate-pulse'>로딩중...</span> : children}
48+
{isLoading ? <span className='animate-pulse'>...</span> : children}
4949
</button>
5050
);
5151
}

src/components/FloatingBox/BookingButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function BookingButton({
3131
{onBooking ? (
3232
<div className='flex items-center justify-center gap-2'>
3333
<span className='h-10 w-10 animate-spin rounded-full border-2 border-white border-t-transparent' />
34-
<p>...</p>
34+
<p>요청전송중...</p>
3535
</div>
3636
) : (
3737
children

0 commit comments

Comments
 (0)