Skip to content

Commit 7dc2eb3

Browse files
authored
Merge pull request #146 from part3-4team-Taskify/sidemenu03
[Fix] vercel 오류 수정및 사이드메뉴, 나의 대쉬보드 수정
2 parents c4fcd58 + 982b0ae commit 7dc2eb3

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

src/api/statusOptions.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ export interface StatusOption {
88
value: number;
99
}
1010

11+
interface Column {
12+
id: number;
13+
title: string;
14+
}
15+
1116
export const useStatusOptions = () => {
1217
const router = useRouter();
1318
const [statusOptions, setStatusOptions] = useState<StatusOption[]>([]);
@@ -28,7 +33,7 @@ export const useStatusOptions = () => {
2833
params: { dashboardId },
2934
});
3035

31-
const options = res.data.data.map((col: any) => ({
36+
const options = (res.data.data as Column[]).map((col) => ({
3237
label: col.title,
3338
value: col.id,
3439
}));

src/components/modalInput/StatusSelect.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@ import clsx from "clsx";
33
import Image from "next/image";
44
import { useRouter } from "next/router";
55
import axiosInstance from "@/api/axiosInstance";
6-
import { TEAM_ID } from "@/constants/team"; // ✅ 전역 team ID 사용
6+
import { TEAM_ID } from "@/constants/team";
77

88
export interface StatusOption {
99
label: string;
1010
value: number;
1111
}
1212

13+
interface Column {
14+
id: number;
15+
title: string;
16+
}
17+
1318
interface StatusSelectProps {
1419
value: string;
1520
onChange: (value: string) => void;
@@ -42,14 +47,13 @@ export default function StatusSelect({
4247

4348
const loadOptions = async () => {
4449
try {
45-
// ✅ 경로에 teamId 직접 넣기 (문자열 리터럴)
4650
const res = await axiosInstance.get(`/${TEAM_ID}/columns`, {
4751
params: { dashboardId },
4852
});
4953

5054
console.log("✅ 상태 목록 응답:", res.data);
5155

52-
const options = res.data.data.map((col: any) => ({
56+
const options = (res.data.data as Column[]).map((col) => ({
5357
label: col.title,
5458
value: col.id,
5559
}));

src/components/sideMenu/SideMenu.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ export default function SideMenu({
2727
onCreateDashboard,
2828
}: SideMenuProps) {
2929
const router = useRouter();
30-
const { boardid } = router.query;
31-
const boardId = parseInt(boardid as string);
30+
const boardId = router.query.dashboardId?.toString(); // ✅ 여기만 정확히 수정
3231

3332
const [currentPage, setCurrentPage] = useState(1);
3433
const [isCollapsed, setIsCollapsed] = useState(false);
@@ -84,6 +83,7 @@ export default function SideMenu({
8483
<div
8584
className={clsx(
8685
"md:flex",
86+
"hidden sm:flex",
8787
isCollapsed ? "justify-center" : "justify-end",
8888
"w-full"
8989
)}
@@ -149,7 +149,6 @@ export default function SideMenu({
149149
</div>
150150
)}
151151

152-
{/* ✅ 접힌 상태에서 아이콘만 있는 추가 버튼 로고 아래로 */}
153152
{isCollapsed && (
154153
<div className="flex justify-center mb-4">
155154
<button
@@ -180,9 +179,9 @@ export default function SideMenu({
180179
<li
181180
key={dashboard.id}
182181
className={clsx(
183-
"w-full flex justify-center md:justify-start p-3 font-18m text-[var(--color-black)] transition-colors duration-200",
184-
dashboard.id === boardId &&
185-
"bg-[var(--primary)] text-white rounded-lg"
182+
"w-full flex justify-center md:justify-start p-3 font-18r text-[var(--color-gray1)] transition-colors duration-200",
183+
dashboard.id.toString() === boardId &&
184+
"bg-[var(--color-violet8)] text-[var(--color-gray1)] rounded-sm"
186185
)}
187186
>
188187
<Link

src/pages/mydashboard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export default function MyDashboardPage() {
156156
setCurrentPage(1);
157157
}}
158158
placeholder="대시보드 이름을 입력하세요"
159-
className="w-full max-w-[332px] px-4 py-2 border border-[var(--color-gray3)] border rounded-md outline-none"
159+
className="w-full max-w-[332px] px-4 py-2 border border-[var(--color-gray3)] border rounded-md outline-none bg-[var(--color-white)]"
160160
/>
161161
</section>
162162

@@ -193,7 +193,7 @@ export default function MyDashboardPage() {
193193
)}
194194

195195
{/* 초대받은 대시보드 */}
196-
<section className="w-full px-[25px]">
196+
<section className="w-full px-[20px]">
197197
<div className="mt-[74px]">
198198
<InvitedDashBoard />
199199
</div>

0 commit comments

Comments
 (0)