-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix * fix * fix * fix * feat: Modify for Inheritance * feat: Move CashLog/me to mypage * fix
- Loading branch information
Showing
4 changed files
with
51 additions
and
49 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ export default function CheckOut({ price }) { | |
customerEmail: "[email protected]", | ||
successUrl: `${window.location.origin}/success`, | ||
failUrl: `${window.location.origin}/fail`, | ||
_skipAuth: "FORCE_SUCCESS", | ||
}); | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,56 @@ | ||
'use client' | ||
"use client"; | ||
|
||
import {Avatar, Spacer} from '@nextui-org/react' | ||
import {FaArrowRight, FaUserCircle} from 'react-icons/fa' | ||
import React from 'react' | ||
import Link from 'next/link' | ||
import {usePathname} from 'next/navigation' | ||
import { Avatar, Spacer } from "@nextui-org/react"; | ||
import { FaArrowRight, FaUserCircle } from "react-icons/fa"; | ||
import React from "react"; | ||
import Link from "next/link"; | ||
import { usePathname } from "next/navigation"; | ||
|
||
export default function LeftBar(props) { | ||
const pathName = usePathname() | ||
const pathName = usePathname(); | ||
|
||
const items = [ | ||
{text: '예약 내역', link: '/mypage/reservations'}, | ||
{text: '내 정보', link: '/mypage/info'}, | ||
{text: '결제 내역', link: '/cashLog/me'}, | ||
{text: '내가 등록한 숙소', link: '/mypage/hotels'}, | ||
{text: '내가 찜한 숙소', link: '/mypage/like'}, | ||
{text: '나의 리뷰', link: '/mypage/reviews'}, | ||
] | ||
const items = [ | ||
{ text: "예약 내역", link: "/mypage/reservations" }, | ||
{ text: "내 정보", link: "/mypage/info" }, | ||
{ text: "결제 내역", link: "/mypage/cashLog" }, | ||
{ text: "내가 등록한 숙소", link: "/mypage/hotels" }, | ||
{ text: "내가 찜한 숙소", link: "/mypage/like" }, | ||
{ text: "나의 리뷰", link: "/mypage/reviews" }, | ||
]; | ||
|
||
return ( | ||
<div className='flex flex-col items-center w-1/4 bg-[#CECECE]'> | ||
<Spacer y={5}/> | ||
<div className={'text-2xl'}>마이페이지</div> | ||
<Spacer y={5}/> | ||
{props.user?.objData.imageUrl ? ( | ||
<Avatar src={props.user.objData.imageUrl} className={'w-44 h-44'}/> | ||
) : ( | ||
<FaUserCircle size={100}/> | ||
)} | ||
<Spacer y={5}/> | ||
<div className={'text-2xl'}>{props.user?.objData.nickname}</div> | ||
<Spacer y={10}/> | ||
<ul className={'flex flex-col w-full'}> | ||
{items.map((item, index) => ( | ||
<Link href={item.link} key={`l-${index}`}> | ||
<li | ||
className={`w-full h-15 p-5 flex items-center ${ | ||
pathName === item.link | ||
? 'bg-white' | ||
: 'hover:cursor-pointer bg-[#898989]' | ||
}`}> | ||
{item.text} | ||
{item.text === '캐시 사용 내역' && ( | ||
<div className={'ml-auto'}> | ||
<FaArrowRight/> | ||
</div> | ||
)} | ||
</li> | ||
</Link> | ||
))} | ||
</ul> | ||
</div> | ||
) | ||
return ( | ||
<div className="flex flex-col items-center w-1/4 bg-[#CECECE]"> | ||
<Spacer y={5} /> | ||
<div className={"text-2xl"}>마이페이지</div> | ||
<Spacer y={5} /> | ||
{props.user?.objData.imageUrl ? ( | ||
<Avatar src={props.user.objData.imageUrl} className={"w-44 h-44"} /> | ||
) : ( | ||
<FaUserCircle size={100} /> | ||
)} | ||
<Spacer y={5} /> | ||
<div className={"text-2xl"}>{props.user?.objData.nickname}</div> | ||
<Spacer y={10} /> | ||
<ul className={"flex flex-col w-full"}> | ||
{items.map((item, index) => ( | ||
<Link href={item.link} key={`l-${index}`}> | ||
<li | ||
className={`w-full h-15 p-5 flex items-center ${ | ||
pathName === item.link | ||
? "bg-white" | ||
: "hover:cursor-pointer bg-[#898989]" | ||
}`} | ||
> | ||
{item.text} | ||
{item.text === "캐시 사용 내역" && ( | ||
<div className={"ml-auto"}> | ||
<FaArrowRight /> | ||
</div> | ||
)} | ||
</li> | ||
</Link> | ||
))} | ||
</ul> | ||
</div> | ||
); | ||
} |