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
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"use client";

import { useRouter } from "next/navigation";
import Image from "next/image";
import BackIcon from "../../../../../../../public/icon/arrow_right_icon.svg";

export default function BackButton() {
const router = useRouter();

return (
<div>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 div로 감싼 이유가 있을까요?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

빠르게 분리하느라 필요 없는 div 태그를 지우는 걸 잊었네요 지우겠습니다!

<button
type="button"
onClick={() => {
router.back();
}}
className="flex gap-2 items-center"
>
<Image
src={BackIcon}
className="scale-x-[-1] w-[18px] h-[18px] tablet:w-[18px] tablet:h-[18px]"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아래처럼 한번에 적용 가능해요

w-[18px] h-[18px] -> size-[18px]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 감사합니다! 가로세로 높이가 같은 경우에는 알려주신 방법으로 스타일을 적용하도록 하겠습니다!

alt=""
/>
<div className="font-medium text-md text-gray-800 tablet:text-lg">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

돌아가기는 텍스트를 담당하는거같은데 p, span같은 태그를 활용해주세요

돌아가기
</div>
</button>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"use client";

import Input from "@/components/common/input/Input";
import Button from "@/components/common/button/Button";

export default function DashboardEditSection() {
return (
<div className="w-full p-4 rounded-lg bg-white tablet:p-6">
<div className="flex flex-col gap-10 tablet:gap-6">
<div className="font-bold text-2lg text-gray-800 tablet:text-2xl">
대시보드 이름
</div>
<div className="flex flex-col gap-6">
<div className="flex flex-col gap-4">
<Input label="대시보드 이름" />
</div>
<Button variant="purple">변경</Button>
</div>
</div>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"use client";

import Pagination from "@/components/common/pagenation-button/PagenationButton";

export default function InvitationSection({
id,
token,
}: {
id: number;
token: string;
}) {
// id 값과 token 값 사용하고 나서는 지워도 되는 코드들
console.log(id);
console.log(token);

return (
<div className="w-full p-4 rounded-lg bg-white tablet:p-6">
<div className="flex items-center justify-between">
<h2 className="font-bold text-2lg text-gray-800 tablet:text-2xl">
초대 내역
</h2>
<div className="flex items-center gap-2">
<span>1 페이지 중 1</span>
<Pagination
currentPage={1}
totalPages={1}
onPageChange={(page) => {
console.log(`구성원 페이지 ${page}로 변경`);
}}
/>
</div>
</div>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"use client";

import Pagination from "@/components/common/pagenation-button/PagenationButton";

export default function MemberSection({
id,
token,
}: {
id: number;
token: string;
}) {
// id 값과 token 값 사용하고 나서는 지워도 되는 코드들
console.log(id);
console.log(token);

return (
<div className="w-full p-4 rounded-lg bg-white tablet:p-6">
<div className="flex items-center justify-between">
<h2 className="font-bold text-2lg text-gray-800 tablet:text-2xl">
구성원
</h2>
<div className="flex items-center gap-2">
<span>1 페이지 중 1</span>
<Pagination
currentPage={1}
totalPages={1}
onPageChange={(page) => {
console.log(`구성원 페이지 ${page}로 변경`);
}}
/>
</div>
</div>
</div>
);
}
26 changes: 24 additions & 2 deletions src/app/(after-login)/dashboard/[dashboardid]/edit/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
export default function Page() {
return <div>/dashboard/dashboardid/edit</div>;
import { cookies } from "next/headers";
import BackButton from "./_components/BackButton";
import DashboardEditSection from "./_components/DashboardEditSection";
import InvitationSection from "./_components/InvitationSection";
import MemberSection from "./_components/MemberSection";

export default function Page({ params }: { params: { dashboardid: string } }) {
const dashboardId = Number(params.dashboardid);
const accessToken = cookies().get("accessToken")?.value ?? "";

return (
<div>
<div className="flex flex-col px-3 py-4 tablet:px-5">
<div className="flex flex-col gap-[6px] tablet:gap-[29px]">
<BackButton />
<div className="flex flex-col gap-4 max-w-[620px]">
<DashboardEditSection />
<MemberSection id={dashboardId} token={accessToken} />
<InvitationSection id={dashboardId} token={accessToken} />
</div>
</div>
</div>
</div>
);
}
2 changes: 1 addition & 1 deletion src/app/(after-login)/mypage/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ProfileSection from "./_components/ProfileSection";

export default function Page() {
return (
<div className="flex flex-col px-3 py-4">
<div className="flex flex-col px-3 py-4 tablet:px-5">
<div className="flex flex-col gap-[6px] tablet:gap-[29px]">
<BackButton />
<div className="flex flex-col gap-4 max-w-[672px] tablet:gap-6">
Expand Down