+
{goalTitle}
{todoTitle}
diff --git a/src/components/TodosDetail/TodosDetailHeader/index.tsx b/src/components/TodosDetail/TodosDetailHeader/index.tsx
index d884a494..2f212e0f 100644
--- a/src/components/TodosDetail/TodosDetailHeader/index.tsx
+++ b/src/components/TodosDetail/TodosDetailHeader/index.tsx
@@ -9,6 +9,8 @@ import { useTodoModalStore } from '@/store/useTodoModalStore';
import { useTodoDataStore } from '@/store/useTodoDataStore';
import { convertImageToBase64 } from '@/apis/Todo/convertImageToBase64';
import { useDeleteTodo } from '@/hooks/apis/Todo/useDeleteTodo';
+import { Dropdown } from '@/components/common/Dropdown';
+import { DROPDOWN } from '@/constants/dropdown';
interface TodosDetailHeaderProps {
todoId: string;
@@ -57,32 +59,37 @@ export const TodosDetailHeader = ({ todoId }: TodosDetailHeaderProps) => {
deleteTodo({ todoId: Number(todoId) });
};
+ const handleSelectItem = (item: { value: string }) => {
+ if (item.value === '수정하기') {
+ handleOpenModify();
+ } else if (item.value === '삭제하기') {
+ handleDelete();
+ }
+ };
+
+ const renderDropdownItem = (item: { value: string }) => {
+ return
{item.value};
+ };
+
return (
-
+
할 일 상세보기
+
- {isOpenTab && (
-
- )}
+
+
+
);
};
diff --git a/src/components/UserProfile/UserProfileContent/index.tsx b/src/components/UserProfile/UserProfileContent/index.tsx
index 59aadbde..dea42649 100644
--- a/src/components/UserProfile/UserProfileContent/index.tsx
+++ b/src/components/UserProfile/UserProfileContent/index.tsx
@@ -32,6 +32,7 @@ export const UserProfileContent = ({ userId }: UserProfileContent) => {
complete.completePic ? (
{
{
diff --git a/src/constants/dropdown.ts b/src/constants/dropdown.ts
index d48352ad..bafa2442 100644
--- a/src/constants/dropdown.ts
+++ b/src/constants/dropdown.ts
@@ -2,4 +2,7 @@ export const DROPDOWN = {
GOAL_HEADER_MENU: ['할일추가', '수정하기', '삭제하기'].map((str) => ({
value: str,
})),
+ TODO_DETAIL_MENU: ['수정하기', '삭제하기'].map((str) => ({
+ value: str,
+ })),
};
diff --git a/src/middleware.ts b/src/middleware.ts
index 87b82ded..d5c6d0d7 100644
--- a/src/middleware.ts
+++ b/src/middleware.ts
@@ -19,6 +19,10 @@ export const middleware = async (request: NextRequest) => {
return NextResponse.next();
}
+ if (pathname === '/' && token) {
+ return NextResponse.redirect(new URL('/dashboard', request.url));
+ }
+
if (!token) {
return NextResponse.redirect(new URL('/signin', request.url));
}