Skip to content

Commit 1db035b

Browse files
authored
Merge pull request #111 from gyoyeon-kim/card-table
[Fix, Refactor] Page : edit 프로필 이미지 수정 / Modal : 초대내역 : 디자인, 페이지네이션 수정
2 parents 27fa3b2 + ff0f6fc commit 1db035b

File tree

7 files changed

+22
-100
lines changed

7 files changed

+22
-100
lines changed

src/components/columnCard/Column.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { CardType } from "@/types/task";
44
import Card from "./Card";
55
import TodoModal from "@/components/modalInput/ToDoModal";
66
import TodoButton from "@/components/button/TodoButton";
7-
import ColumnManageModal from "@/components/columnCard/ColumnManageModal";
8-
import ColumnDeleteModal from "@/components/columnCard/ColumnDeleteModal";
7+
import ColumnManageModal from "@/components/columncard/ColumnManageModal";
8+
import ColumnDeleteModal from "@/components/columncard/ColumnDeleteModal";
99
import { updateColumn, deleteColumn } from "@/api/dashboards";
1010
import { getDashboardMembers } from "@/api/card";
1111

src/components/modal/ChangeBebridge.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const ChangeBebridge = () => {
4747
/* 대시보드 이름 변경 버튼 */
4848
const handleUpdate = async () => {
4949
const dashboardIdNumber = Number(dashboardId); // string dashboradId 값 number로 변경
50-
if (!dashboardId || !title || selected === null) return;
50+
if (!dashboardId || selected === null) return;
5151

5252
const payload = {
5353
title,
@@ -89,7 +89,8 @@ const ChangeBebridge = () => {
8989
{colors.map((color, index) => (
9090
<div key={index} className="relative">
9191
<button
92-
className={`cursor-pointer w-[30px] h-[30px] rounded-[15px] mr-2`}
92+
className={`cursor-pointer w-[30px] h-[30px] rounded-[15px] mr-2 transition-all duration-200
93+
hover:opacity-70 hover:scale-110`}
9394
style={{ backgroundColor: color }}
9495
onClick={() => setSelected(index)} // 색상 선택 시 selected 업데이트
9596
/>
@@ -108,8 +109,8 @@ const ChangeBebridge = () => {
108109
<div className="mt-8 flex">
109110
<button
110111
onClick={handleUpdate} // 버튼 클릭 시 handleUpdate 함수 호출
111-
disabled={!title || selected === null} // title 또는 color가 없으면 버튼 비활성화
112-
className={`cursor-pointer sm:w-[564px] sm:h-[54px] w-[252px] h-[54px] rounded-[8px] border border-[var(--color-gray3)] bg-[var(--primary)] text-[var(--color-white)] ${!title || selected === null ? "bg-gray-300 cursor-not-allowed" : "bg-[var(--primary)]"}`}
112+
disabled={selected === null} // color가 없으면 버튼 비활성화
113+
className={`cursor-pointer sm:w-[564px] sm:h-[54px] w-[252px] h-[54px] rounded-[8px] border border-[var(--color-gray3)] bg-[var(--primary)] text-[var(--color-white)] ${selected === null ? "bg-gray-300 cursor-not-allowed" : "bg-[var(--primary)]"}`}
113114
>
114115
변경
115116
</button>

src/components/table/InviteRecords.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ const InviteRecords = ({ dashboardId }: { dashboardId: string }) => {
7474
}
7575
};
7676

77+
const [isModalOpen, setIsModalOpen] = useState(false);
78+
79+
/* 페이지네이션 */
7780
const [currentPage, setCurrentPage] = useState(1);
7881
const itemsPerPage = 5;
79-
const totalPages = Math.ceil(inviteList.length / itemsPerPage);
80-
81-
const [isModalOpen, setIsModalOpen] = useState(false);
82+
const totalPages = Math.max(1, Math.ceil(inviteList.length / itemsPerPage));
8283

8384
const paginatedInvitation = Array.isArray(inviteList)
8485
? inviteList.slice(

src/components/table/invited/EmptyInvitations.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function EmptyInvitations() {
22
return (
3-
<div className="relative sm:w-[960px] w-[260px] sm:h-[390px] h:[327px] rounded-[16px] sm:p-[24px_40px_120px_40px] p-[24px_20px_80px_20px] bg-white shadow-md">
3+
<div className="relative sm:w-[960px] w-[260px] sm:h-[390px] h:[327px] rounded-[16px] sm:p-[24px_40px_120px_40px] p-[24px_20px_80px_20px] bg-white">
44
<div className="flex justify-between ">
55
<p className="sm:text-2xl text-sm font-bold mb-4 ">초대받은 대시보드</p>
66
</div>

src/components/table/member/MemberList.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { MemberType } from "@/types/users";
55
import { getMembers } from "@/api/members";
66
import { apiRoutes } from "@/api/apiRoutes";
77
import axiosInstance from "@/api/axiosInstance";
8+
import Image from "next/image";
89
import { ToastContainer, toast } from "react-toastify";
910
import "react-toastify/dist/ReactToastify.css";
1011

@@ -91,11 +92,14 @@ const MemberList: React.FC<HeaderBebridgeProps> = ({ dashboardId }) => {
9192
>
9293
<div className="flex items-center gap-4">
9394
{member.profileImageUrl ? (
94-
<img
95-
src={member.profileImageUrl}
96-
alt="유저 프로필 아이콘"
97-
className="w-full h-full rounded-full object-cover"
98-
/>
95+
<div className="relative w-[34px] h-[34px] md:w-[38px] md:h-[38px] rounded-full border-[2px] border-white overflow-hidden">
96+
<Image
97+
src={member.profileImageUrl}
98+
alt={member.nickname}
99+
fill
100+
className="object-cover"
101+
/>
102+
</div>
99103
) : (
100104
<RandomProfile name={member.nickname} index={index} />
101105
)}

src/pages/dashboard/[dashboardId]/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default function EditDashboard() {
103103
<div className="flex mt-15 sm:mt-0 ml-8">
104104
<button
105105
onClick={handleDelete}
106-
className="text-base sm:text-lg cursor-pointer w-[320px] h-[62px] text-[var(--color-black3)] rounded-[8px] border-[1px] border-[#D9D9D9]"
106+
className="text-base sm:text-lg cursor-pointer w-[320px] h-[62px] text-[var(--color-black3)] rounded-[8px] border-[1px] border-[#D9D9D9] hover:scale-105 transition-transform duration-200"
107107
>
108108
대시보드 삭제하기
109109
</button>

src/pages/test.tsx

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)