Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/app/mypage/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function GatheringEdit({ params }: { params: { id: string } }) {
if (!gatheringDetail) {
return <EmptyElement>모임 정보를 가져올 수 없습니다.</EmptyElement>;
}
// console.log(gatheringDetail);
console.log(gatheringDetail);
return (
<>
<div className="flex h-full w-full flex-col gap-12 overflow-x-hidden px-4 pb-5 pt-24 md:px-6 md:pb-12 md:pt-32 xl:mx-auto xl:max-w-[1166px] xl:px-0">
Expand All @@ -30,6 +30,7 @@ export default function GatheringEdit({ params }: { params: { id: string } }) {
editThemeName={gatheringDetail.themeName}
editDateTime={gatheringDetail.dateTime}
editRegistrationEnd={gatheringDetail.registrationEnd}
editMessage={gatheringDetail.message}
/>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/@shared/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default function Header() {
/>
</button>
{isMenuOpen && (
<ul className="absolute right-0 z-50 mt-8 w-32 rounded-md bg-secondary-80 text-[16px] font-normal shadow-md md:top-3 xl:left-0">
<ul className="absolute -right-12 z-50 mt-8 w-32 rounded-md bg-secondary-80 text-[16px] font-normal shadow-md md:top-3">
<li>
<Link href="/mypage" onClick={closeDropdown}>
<button
Expand Down
20 changes: 12 additions & 8 deletions src/components/@shared/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type PaginationProps = {
onNext: () => void;
onPrev: () => void;
className?: string;
mypage?: boolean;
};

export default function Pagination({
Expand All @@ -17,6 +18,7 @@ export default function Pagination({
onNext,
onPrev,
className,
mypage,
}: PaginationProps) {
const totalPages = Math.ceil(totalItems / itemsPerPage);

Expand All @@ -26,31 +28,33 @@ export default function Pagination({
type="button"
onClick={onPrev}
disabled={currentPage === 0}
className="h-6 w-6 rounded-md bg-secondary-90"
className="h-6 w-6 rounded-l-md bg-secondary-90"
>
<Image
src="/icons/ic_arrow_right.svg"
src="/icons/arrow_line_white.svg"
alt="흰색 화살표 아이콘"
width={24}
height={24}
className={`rotate-180 ${currentPage === 0 ? 'opacity-50' : ''}`}
className={`rotate-180 ${currentPage === 0 && 'opacity-50'}`}
/>
</button>
<span className="text-white">
{currentPage + 1} / {totalPages}
</span>
{mypage && (
<span className="text-white">
{currentPage + 1} / {totalPages}
</span>
)}
<button
type="button"
onClick={onNext}
disabled={currentPage >= totalPages - 1}
className="h-6 w-6 rounded-r-md bg-secondary-90"
>
<Image
src="/icons/ic_arrow_right.svg"
src="/icons/arrow_line_white.svg"
alt="흰색 화살표 아이콘"
width={24}
height={24}
className={`${currentPage >= totalPages - 1 ? 'opacity-50' : ''}`}
className={`${currentPage === totalPages - 1 && 'opacity-50'}`}
/>
</button>
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/components/gatheringEdit/GatheringForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ interface GatheringFormProps {
editThemeName?: string;
editDateTime?: string;
editRegistrationEnd?: string;
editMessage?: string;
}

export default function GatheringForm({
Expand All @@ -44,6 +45,7 @@ export default function GatheringForm({
editThemeName,
editDateTime,
editRegistrationEnd,
editMessage,
}: GatheringFormProps) {
const queryClient = useQueryClient();
const { trigger, register, handleSubmit, setValue, watchFields, formState } =
Expand Down Expand Up @@ -93,6 +95,9 @@ export default function GatheringForm({
if (editRegistrationEnd) {
setValue('registrationEnd', editRegistrationEnd);
}
if (editMessage) {
setValue('message', editMessage);
}
}
}, [
isEdit,
Expand Down
1 change: 1 addition & 0 deletions src/components/mypage/myCreateGathering.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default function MyCreateGathering() {
onNext={handleNextPage}
onPrev={handlePrevPage}
className="mt-4 flex items-center justify-center gap-3"
mypage
/>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions src/components/mypage/myGathering.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default function MyGathering() {
onNext={handleNextPage}
onPrev={handlePrevPage}
className="mt-4 flex items-center justify-center gap-3"
mypage
/>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions src/components/mypage/myReviewNotWrite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default function MyReviewNotWrite() {
onNext={handleNextPage}
onPrev={handlePrevPage}
className="mt-4 flex items-center justify-center gap-3"
mypage
/>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions src/components/mypage/myReviewWrite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default function MyReviewWrite() {
onNext={handleNextPage}
onPrev={handlePrevPage}
className="mt-4 flex items-center justify-center gap-3"
mypage
/>
</div>
);
Expand Down