+
+ {ReviewComponent()}
+
{!user && (
diff --git a/src/app/(with-header)/myactivity/[id]/hooks/useEditActivityForm.ts b/src/app/(with-header)/myactivity/[id]/hooks/useEditActivityForm.ts
index 945687d..7ed9ba5 100644
--- a/src/app/(with-header)/myactivity/[id]/hooks/useEditActivityForm.ts
+++ b/src/app/(with-header)/myactivity/[id]/hooks/useEditActivityForm.ts
@@ -141,10 +141,29 @@ export const useEditActivityForm = () => {
}
const newSchedules = dates.filter((d) => !d.id);
+
const scheduleIdsToRemove = originalSchedules
.filter((orig) => !dates.some((d) => d.id === orig.id))
- .map((d) => d.id)
- .filter((id): id is number => id !== undefined);
+ .map((d) => d.id!)
+ .filter(Boolean);
+
+ originalSchedules.forEach((orig) => {
+ const matched = dates.find((d) => d.id === orig.id);
+ if (
+ matched &&
+ (matched.date !== orig.date ||
+ matched.startTime !== orig.startTime ||
+ matched.endTime !== orig.endTime)
+ ) {
+ newSchedules.push({
+ date: matched.date,
+ startTime: matched.startTime,
+ endTime: matched.endTime,
+ });
+
+ scheduleIdsToRemove.push(orig.id!);
+ }
+ });
const parsedPrice = parseInt(price, 10);
if (isNaN(parsedPrice) || parsedPrice <= 0) {
diff --git a/src/app/(with-header)/myactivity/components/InfoSection.tsx b/src/app/(with-header)/myactivity/components/InfoSection.tsx
index 9d73cc4..c507ac6 100644
--- a/src/app/(with-header)/myactivity/components/InfoSection.tsx
+++ b/src/app/(with-header)/myactivity/components/InfoSection.tsx
@@ -39,6 +39,7 @@ export function InfoSection({
placeholder='제목'
className='w-full'
value={title}
+ maxLength={20}
onChange={(e) => onTitleChange(e.target.value)}
/>
diff --git a/src/components/Button.tsx b/src/components/Button.tsx
index 02fe680..7cd0b3d 100644
--- a/src/components/Button.tsx
+++ b/src/components/Button.tsx
@@ -45,7 +45,7 @@ export default function Button({
)}
{...props}
>
- {isLoading ?
로딩중... : children}
+ {isLoading ?
... : children}
);
}
diff --git a/src/components/FloatingBox/BookingButton.tsx b/src/components/FloatingBox/BookingButton.tsx
index af11bf3..3ae771e 100644
--- a/src/components/FloatingBox/BookingButton.tsx
+++ b/src/components/FloatingBox/BookingButton.tsx
@@ -31,7 +31,7 @@ export default function BookingButton({
{onBooking ? (
) : (
children