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
2 changes: 1 addition & 1 deletion src/app/(route)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client';

export default function Home() {
return <div className="px-16 pt-48 sm:pt-0">asdf</div>;
return;
}
1 change: 1 addition & 0 deletions src/components/Dashboard/Follower/FollowerStory/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const TodoPic = ({ index, color, pic, status, date }: TodoItemProps) => {
<Image
src={pic}
fill
sizes="100vw"
alt="인증 사진"
onLoad={() => setIsLoaded(true)}
className="rounded-16 object-cover opacity-50"
Expand Down
1 change: 1 addition & 0 deletions src/components/Follows/Post/PostImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions src/components/Follows/Post/PostProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export function PostProfile(props: PostProfileProps) {
<Image
src={profilePic}
alt="profilePic"
sizes="100vw"
width={40}
height={40}
className="max-h-40 max-w-40 rounded-full"
Expand Down
1 change: 1 addition & 0 deletions src/components/MyPage/MyProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const MyProfile = () => {
<Image
width={123}
height={123}
sizes="100vw"
className="size-123 rounded-23 bg-custom-white-200"
alt="프로필 사진"
priority
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const SearchGoalList = ({
<Image
width={48}
height={48}
sizes="100vw"
className="flex size-48 rounded-90"
src={item.profilePic}
alt="프로필 사진"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const SearchUserList = ({
<Image
width={48}
height={48}
sizes="100vw"
className="flex size-48 rounded-90"
src={item.profilePic}
alt="프로필 사진"
Expand Down
1 change: 1 addition & 0 deletions src/components/Sidebar/Profle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const Profile = () => {
alt="profile picture"
width={37}
height={37}
sizes="100vw"
className="aspect-square shrink-0 rounded-8 p-2"
priority
/>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ export const Sidebar = () => {
</div>
{isOpen ? (
<FaAnglesLeft
className="size-28 cursor-pointer p-4 text-custom-gray-200"
className="size-28 cursor-pointer p-4 text-custom-gray-100"
onClick={close}
/>
) : (
<FaBars
className="size-28 cursor-pointer p-4 text-slate-400"
className="size-28 cursor-pointer p-4 text-custom-gray-100"
onClick={open}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/components/Todos/TodoItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const TodoItem = (props: TodoItemProps) => {
<Image
src={complete.completePic}
alt="Complete Picture"
sizes="100vw"
fill
className="object-fill"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const TodoDocs = ({ todoLink, todoPic }: TodoDocsProps) => {
<Image
width={340}
height={340}
sizes="100vw"
className="h-340 w-full rounded-16 object-cover"
priority
src={todoPic}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const BasicTodoItem = ({
>
<FaListUl fill="white" />
</div>
<div className="flex flex-col items-start">
<div className="flex cursor-pointer flex-col items-start ">
<span className="text-xs-medium text-custom-gray-100">{goalTitle}</span>
<span className="text-base-medium">{todoTitle}</span>
</div>
Expand Down
43 changes: 25 additions & 18 deletions src/components/TodosDetail/TodosDetailHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 <span>{item.value}</span>;
};

return (
<div className="flex items-center justify-between">
<div className="relative flex items-center justify-between">
<div className="flex items-center gap-16">
<IoMdClose className="size-24 cursor-pointer" onClick={handleBack} />
<span className="text-xl-semibold">할 일 상세보기</span>
</div>

<FaEllipsisVertical
className="relative size-24 p-2 text-custom-gray-100"
className="size-24 p-2 text-custom-gray-100"
onClick={handleClick}
/>
{isOpenTab && (
<div className="absolute right-16 top-48 flex flex-col rounded-12 bg-white">
<div
className="flex-center cursor-pointer rounded-t-12 px-16 py-8 text-sm-normal hover:bg-custom-white-200"
onClick={handleOpenModify}
>
수정하기
</div>
<div
className="flex-center cursor-pointer rounded-b-12 px-16 py-8 text-sm-normal hover:bg-custom-white-200"
onClick={handleDelete}
>
삭제하기
</div>
</div>
)}
<div className="absolute right-0 top-40 w-81">
<Dropdown
dropdownData={DROPDOWN.TODO_DETAIL_MENU}
onSelectItem={handleSelectItem}
isOpenDropdown={isOpenTab}
renderItem={renderDropdownItem}
/>
</div>
</div>
);
};
1 change: 1 addition & 0 deletions src/components/UserProfile/UserProfileContent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const UserProfileContent = ({ userId }: UserProfileContent) => {
complete.completePic ? (
<Image
key={complete.completeId}
sizes="100vw"
width={48}
height={48}
className="flex h-109 w-full rounded-4"
Expand Down
1 change: 1 addition & 0 deletions src/components/UserProfile/UserProfileHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const UserProfileHeader = ({ userId }: UserProfileHeader) => {
<Image
width={48}
height={48}
sizes="100vw"
className="flex size-64 rounded-full"
priority
src={profilePic}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const VerificationNoteImage = (props: VerificationNoteImageProps) => {
<Image
src={imageUrl}
alt="Selected Image"
sizes="100vw"
className="size-full rounded-16 object-cover"
fill
/>
Expand Down
3 changes: 3 additions & 0 deletions src/constants/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ export const DROPDOWN = {
GOAL_HEADER_MENU: ['할일추가', '수정하기', '삭제하기'].map((str) => ({
value: str,
})),
TODO_DETAIL_MENU: ['수정하기', '삭제하기'].map((str) => ({
value: str,
})),
};
4 changes: 4 additions & 0 deletions src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
Loading