File tree Expand file tree Collapse file tree
dashboard/[dashboardid]/edit Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import { useRouter } from "next/navigation" ;
4+ import Image from "next/image" ;
5+ import BackIcon from "../../../../../../../public/icon/arrow_right_icon.svg" ;
6+
7+ export default function BackButton ( ) {
8+ const router = useRouter ( ) ;
9+
10+ return (
11+ < div >
12+ < button
13+ type = "button"
14+ onClick = { ( ) => {
15+ router . back ( ) ;
16+ } }
17+ className = "flex gap-2 items-center"
18+ >
19+ < Image
20+ src = { BackIcon }
21+ className = "scale-x-[-1] w-[18px] h-[18px] tablet:w-[18px] tablet:h-[18px]"
22+ alt = ""
23+ />
24+ < div className = "font-medium text-md text-gray-800 tablet:text-lg" >
25+ 돌아가기
26+ </ div >
27+ </ button >
28+ </ div >
29+ ) ;
30+ }
Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import Input from "@/components/common/input/Input" ;
4+ import Button from "@/components/common/button/Button" ;
5+
6+ export default function DashboardEditSection ( ) {
7+ return (
8+ < div className = "w-full p-4 rounded-lg bg-white tablet:p-6" >
9+ < div className = "flex flex-col gap-10 tablet:gap-6" >
10+ < div className = "font-bold text-2lg text-gray-800 tablet:text-2xl" >
11+ 대시보드 이름
12+ </ div >
13+ < div className = "flex flex-col gap-6" >
14+ < div className = "flex flex-col gap-4" >
15+ < Input label = "대시보드 이름" />
16+ </ div >
17+ < Button variant = "purple" > 변경</ Button >
18+ </ div >
19+ </ div >
20+ </ div >
21+ ) ;
22+ }
Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import Pagination from "@/components/common/pagenation-button/PagenationButton" ;
4+
5+ export default function InvitationSection ( {
6+ id,
7+ token,
8+ } : {
9+ id : number ;
10+ token : string ;
11+ } ) {
12+ // id 값과 token 값 사용하고 나서는 지워도 되는 코드들
13+ console . log ( id ) ;
14+ console . log ( token ) ;
15+
16+ return (
17+ < div className = "w-full p-4 rounded-lg bg-white tablet:p-6" >
18+ < div className = "flex items-center justify-between" >
19+ < h2 className = "font-bold text-2lg text-gray-800 tablet:text-2xl" >
20+ 초대 내역
21+ </ h2 >
22+ < div className = "flex items-center gap-2" >
23+ < span > 1 페이지 중 1</ span >
24+ < Pagination
25+ currentPage = { 1 }
26+ totalPages = { 1 }
27+ onPageChange = { ( page ) => {
28+ console . log ( `구성원 페이지 ${ page } 로 변경` ) ;
29+ } }
30+ />
31+ </ div >
32+ </ div >
33+ </ div >
34+ ) ;
35+ }
Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import Pagination from "@/components/common/pagenation-button/PagenationButton" ;
4+
5+ export default function MemberSection ( {
6+ id,
7+ token,
8+ } : {
9+ id : number ;
10+ token : string ;
11+ } ) {
12+ // id 값과 token 값 사용하고 나서는 지워도 되는 코드들
13+ console . log ( id ) ;
14+ console . log ( token ) ;
15+
16+ return (
17+ < div className = "w-full p-4 rounded-lg bg-white tablet:p-6" >
18+ < div className = "flex items-center justify-between" >
19+ < h2 className = "font-bold text-2lg text-gray-800 tablet:text-2xl" >
20+ 구성원
21+ </ h2 >
22+ < div className = "flex items-center gap-2" >
23+ < span > 1 페이지 중 1</ span >
24+ < Pagination
25+ currentPage = { 1 }
26+ totalPages = { 1 }
27+ onPageChange = { ( page ) => {
28+ console . log ( `구성원 페이지 ${ page } 로 변경` ) ;
29+ } }
30+ />
31+ </ div >
32+ </ div >
33+ </ div >
34+ ) ;
35+ }
Original file line number Diff line number Diff line change 1- export default function Page ( ) {
2- return < div > /dashboard/dashboardid/edit</ div > ;
1+ import { cookies } from "next/headers" ;
2+ import BackButton from "./_components/BackButton" ;
3+ import DashboardEditSection from "./_components/DashboardEditSection" ;
4+ import InvitationSection from "./_components/InvitationSection" ;
5+ import MemberSection from "./_components/MemberSection" ;
6+
7+ export default function Page ( { params } : { params : { dashboardid : string } } ) {
8+ const dashboardId = Number ( params . dashboardid ) ;
9+ const accessToken = cookies ( ) . get ( "accessToken" ) ?. value ?? "" ;
10+
11+ return (
12+ < div >
13+ < div className = "flex flex-col px-3 py-4 tablet:px-5" >
14+ < div className = "flex flex-col gap-[6px] tablet:gap-[29px]" >
15+ < BackButton />
16+ < div className = "flex flex-col gap-4 max-w-[620px]" >
17+ < DashboardEditSection />
18+ < MemberSection id = { dashboardId } token = { accessToken } />
19+ < InvitationSection id = { dashboardId } token = { accessToken } />
20+ </ div >
21+ </ div >
22+ </ div >
23+ </ div >
24+ ) ;
325}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import ProfileSection from "./_components/ProfileSection";
44
55export default function Page ( ) {
66 return (
7- < div className = "flex flex-col px-3 py-4" >
7+ < div className = "flex flex-col px-3 py-4 tablet:px-5 " >
88 < div className = "flex flex-col gap-[6px] tablet:gap-[29px]" >
99 < BackButton />
1010 < div className = "flex flex-col gap-4 max-w-[672px] tablet:gap-6" >
You can’t perform that action at this time.
0 commit comments