diff --git a/src/app/(route)/page.tsx b/src/app/(route)/page.tsx index 1a4089f3..1f57f866 100644 --- a/src/app/(route)/page.tsx +++ b/src/app/(route)/page.tsx @@ -1,5 +1,5 @@ 'use client'; export default function Home() { - return
asdf
; + return; } diff --git a/src/components/Dashboard/Follower/FollowerStory/index.tsx b/src/components/Dashboard/Follower/FollowerStory/index.tsx index 69ba5f89..a241ed98 100644 --- a/src/components/Dashboard/Follower/FollowerStory/index.tsx +++ b/src/components/Dashboard/Follower/FollowerStory/index.tsx @@ -26,6 +26,7 @@ export const FollowerStory = ({ follower }: FollowerStoryProps) => { src={pic} width={120} height={120} + sizes="100vw" alt="팔로워 인증 사진" className="size-120 rounded-20 object-cover" /> diff --git a/src/components/Dashboard/GoalList/GoalItem/TodoList/TodoPic/index.tsx b/src/components/Dashboard/GoalList/GoalItem/TodoList/TodoPic/index.tsx index 5a6a6d74..373f0905 100644 --- a/src/components/Dashboard/GoalList/GoalItem/TodoList/TodoPic/index.tsx +++ b/src/components/Dashboard/GoalList/GoalItem/TodoList/TodoPic/index.tsx @@ -36,6 +36,7 @@ export const TodoPic = ({ index, color, pic, status, date }: TodoItemProps) => { 인증 사진 setIsLoaded(true)} className="rounded-16 object-cover opacity-50" diff --git a/src/components/Follows/Post/PostImage.tsx b/src/components/Follows/Post/PostImage.tsx index edeface7..487d5fd4 100644 --- a/src/components/Follows/Post/PostImage.tsx +++ b/src/components/Follows/Post/PostImage.tsx @@ -28,6 +28,7 @@ export function PostImage(props: PostImageProps) { src={completePic} alt="post-image" width={100} + sizes="100vw" height={100} className="my-8 aspect-square w-full cursor-pointer" onClick={handleClickImage} diff --git a/src/components/Follows/Post/PostProfile.tsx b/src/components/Follows/Post/PostProfile.tsx index 9c0fe11e..01b49701 100644 --- a/src/components/Follows/Post/PostProfile.tsx +++ b/src/components/Follows/Post/PostProfile.tsx @@ -29,6 +29,7 @@ export function PostProfile(props: PostProfileProps) { profilePic { 프로필 사진 { alt="profile picture" width={37} height={37} + sizes="100vw" className="aspect-square shrink-0 rounded-8 p-2" priority /> diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index 9d964fa4..a68da91d 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -69,12 +69,12 @@ export const Sidebar = () => { {isOpen ? ( ) : ( )} diff --git a/src/components/TodoModal/TodoModalDocs/FileUpload/index.tsx b/src/components/TodoModal/TodoModalDocs/FileUpload/index.tsx index 719d25cd..2ee23539 100644 --- a/src/components/TodoModal/TodoModalDocs/FileUpload/index.tsx +++ b/src/components/TodoModal/TodoModalDocs/FileUpload/index.tsx @@ -45,6 +45,7 @@ export const FileUpload = () => { src={todoData.imageEncodedBase64} width={200} height={200} + sizes="100vw" alt="preview" priority className="size-full rounded-12 object-cover" diff --git a/src/components/Todos/TodoItem.tsx b/src/components/Todos/TodoItem.tsx index 539ada38..b6a08c90 100644 --- a/src/components/Todos/TodoItem.tsx +++ b/src/components/Todos/TodoItem.tsx @@ -84,6 +84,7 @@ export const TodoItem = (props: TodoItemProps) => { Complete Picture diff --git a/src/components/TodosDetail/TodosDetailContent/TodoDocs/index.tsx b/src/components/TodosDetail/TodosDetailContent/TodoDocs/index.tsx index 5ad979a9..4a6303e8 100644 --- a/src/components/TodosDetail/TodosDetailContent/TodoDocs/index.tsx +++ b/src/components/TodosDetail/TodosDetailContent/TodoDocs/index.tsx @@ -16,6 +16,7 @@ export const TodoDocs = ({ todoLink, todoPic }: TodoDocsProps) => { -
+
{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 ? ( { { Selected Image 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)); }