Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ient into develop
  • Loading branch information
oaoong committed Nov 27, 2023
2 parents 0b7c32f + 96a89b4 commit c527402
Show file tree
Hide file tree
Showing 49 changed files with 23 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const useCardModifyForm = ({
cardId: cardId,
cardReq: data,
})
router.push(AppPath.cardDetail(cardId))
router.push(AppPath.card(cardId))
toast({
title: 'Success',
description: '게시글을 성공적으로 수정했습니다.',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ const ChatRoomCard = ({
chatRoom: { chatRoomId, createdAt, fromCardInfo, toCardInfo },
}: ChatRoomCardProps) => {
return (
<Link href={AppPath.chatRooms(String(chatRoomId))}>
<Link href={AppPath.chatRoom(String(chatRoomId))}>
<Card type={'line'} size={'xs'} className="p-2">
<CardFlex justify={'between'} gap={'space'} className="h-full">
<CardFlex align={'center'} gap={'space'} className="w-full">
<CardFlex>
<div className="h-11 w-11 relative flex-shrink-0">
<div className="relative flex-shrink-0 h-11 w-11">
<CardImage
alt={'내 물건 이미지'}
src={fromCardInfo.cardInfo.thumbnail}
Expand All @@ -29,10 +29,7 @@ const ChatRoomCard = ({
className="rounded-full"
/>
</div>
<div
className="h-11 w-11 relative flex-shrink-0 right-4
"
>
<div className="relative flex-shrink-0 h-11 w-11 right-4 ">
<CardImage
alt={'상대 물건 아이디'}
src={toCardInfo.cardInfo.thumbnail}
Expand All @@ -58,7 +55,7 @@ const ChatRoomCard = ({
)}
</CardText>
</CardFlex>
<div className="h-5 w-5 relative flex-shrink-0">
<div className="relative flex-shrink-0 w-5 h-5">
<CardImage
alt={'교환 아이콘'}
src={Assets.switchHorizontal}
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/app/(root)/(routes)/mypage/components/Links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ const pages = [
{
id: 3,
text: '거래 내역',
path: AppPath.histories(),
path: AppPath.myHistory(),
icon: Assets.refreshIcon,
},
{
id: 4,
text: '채팅방 목록',
path: AppPath.chatRoomList(),
path: AppPath.chatRooms(),
icon: Assets.chatIcon,
},
{
id: 5,
text: '알림',
path: AppPath.notifications(),
path: AppPath.myNotifications(),
icon: Assets.alarmIcon,
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const MyCardDescriptionSection = ({
tradeArea,
},
}: MyCardDescriptionSection) => (
<Link href={`${AppPath.cardDetail(String(cardId))}`} className="w-full">
<Link href={`${AppPath.card(String(cardId))}`} className="w-full">
<div className="flex h-card-lg p-1.5 justify-center w-full">
<CardFlex
direction={'row'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const SuggestionButtons = ({
// TODO : 채팅 페이지 라우팅 및 설정이 나오면 라우팅 기능 만들기
const AcceptedButton = () => {
return (
<Link href={`${AppPath.chatRooms('')}`}>
<Link href={`${AppPath.chatRooms()}`}>
<Button variant={'gradation'}>채팅</Button>
</Link>
)
Expand Down Expand Up @@ -95,7 +95,7 @@ const MySuggestionCard = ({
}

return (
<Link href={AppPath.cardDetail(String(cardId))}>
<Link href={AppPath.card(String(cardId))}>
<div className="mb-6">
<Card size={'lg'}>
<CardFlex
Expand Down
7 changes: 0 additions & 7 deletions src/app/(root)/(routes)/test-auth-only/page.tsx

This file was deleted.

40 changes: 0 additions & 40 deletions src/app/(root)/(routes)/test-not-auth-only/page.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const TradeStatusCard = ({
},
}: TradeStatusCardProps) => {
return (
<Link href={`${AppPath.cardDetail(String(cardId))}`}>
<Link href={`${AppPath.card(String(cardId))}`}>
<Card size={'sm'}>
<CardFlex
direction={'row'}
Expand Down
2 changes: 1 addition & 1 deletion src/components/domain/header/components/MenuButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const MenuButton = () => {
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => {
router.push(AppPath.chatRoomList())
router.push(AppPath.chatRooms())
}}
>
채팅방 조회
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const NotificationButton = ({
const router = useRouter()

const onClickButton = () => {
router.push(AppPath.notifications())
router.push(AppPath.myNotifications())
}

return (
Expand Down
19 changes: 9 additions & 10 deletions src/config/appPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@ const AppPath = {
home: () => '/' as const,
login: () => '/login' as const,
logout: () => '/logout' as const,
cards: () => `/cards/` as const,
cards: () => `/cards` as const,
card: (cardId: string) => `/cards/${cardId}` as const,
newCard: () => '/cards/new' as const,
cardDetail: (cardId: string) => `/cards/${cardId}` as const,
modifyCard: (cardId: string) => `/cards/${cardId}/modify` as const,
myCards: () => '/cards/my' as const,
mypage: () => '/mypage' as const,
myDibs: () => '/mypage/mydibs',
myCards: () => '/mypage/mycards' as const,
notifications: () => '/mypage/notifications' as const,
mySuggestions: (cardId: number) => `/mypage/suggestions/${cardId}` as const,
histories: () => '/mypage/histories' as const,
myDibs: () => '/dibs' as const,
myNotifications: () => '/notifications' as const,
mySuggestions: (cardId: number) => `/suggestions/${cardId}` as const,
myHistory: () => '/history' as const,
kakaoLogin: () =>
`${Environment.apiAddress()}/users/oauth2/authorize/kakao/login` as const,
googleLogin: () =>
`${Environment.apiAddress()}/users/oauth2/authorize/google/login` as const,
modifyCard: (cardId: string) => `/cards/${cardId}/modify` as const,
chatRooms: () => '/chatrooms' as const,
chatRoom: (chatRoomId: string) => `/chatrooms/${chatRoomId}` as const,
chatRoomList: () => '/chatrooms' as const,
chatRooms: (chatRoomId?: string) => `/chatrooms/${chatRoomId}`,
} as const

type AppPathReturnType = {
Expand Down

0 comments on commit c527402

Please sign in to comment.