Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎉 각 카드 스타일 수정, 페이지 타이틀 스타일 수정 #127

Merged
merged 16 commits into from
Nov 28, 2023
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
18 changes: 6 additions & 12 deletions src/app/(root)/(routes)/cards/my/components/my-card/MyCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const MoveToItemListPageButton = ({ priceRange }: { priceRange: string }) => (
<Link href={`${AppPath.cards()}?priceRange=${priceRange}`}>
<CardFlex align={'center'} gap={'space'}>
<Image src={Assets.checkCircle} alt="check-circle" />
<CardText>제안 하러가기</CardText>
<CardText className="break-keep">제안 하러가기</CardText>
</CardFlex>
</Link>
)
Expand All @@ -25,7 +25,7 @@ const MoveToSuggestCheckPageButton = ({ cardId }: { cardId: number }) => (
<Link href={`${AppPath.mySuggestions(cardId)}`}>
<CardFlex align={'center'} gap={'space'}>
<Image src={Assets.arrowCircleRight} alt="arrow-circle-right" />{' '}
<CardText>제안 확인</CardText>
<CardText className="break-keep">제안 확인</CardText>
</CardFlex>
</Link>
)
Expand Down Expand Up @@ -54,7 +54,7 @@ const MyCard = ({
gap={'space'}
className="h-full"
>
<div className="relative h-full w-36">
<div className="relative h-full min-w-[128px]">
<CardImage
className="rounded-lg"
src={thumbnail}
Expand All @@ -67,13 +67,10 @@ const MyCard = ({
<CardFlex
direction={'col'}
justify={'between'}
className="w-2/3 h-full"
className="w-full h-full"
>
<CardFlex align={'center'} gap={'space'}>
<CardText
type={'title'}
className="overflow-hidden whitespace-nowrap overflow-ellipsis"
>
<CardText type={'title'} className="line-clamp-1">
{cardTitle}
</CardText>
{status === 'TRADE_AVAILABLE' ? (
Expand All @@ -84,10 +81,7 @@ const MyCard = ({
<TradeCompleteBadge />
)}
</CardFlex>
<CardText
type={'description'}
className="overflow-hidden whitespace-nowrap overflow-ellipsis"
>
<CardText type={'description'} className="line-clamp-1">
{itemName}
</CardText>
<CardText type={'description'}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const NotificationCard = ({
objectFit="cover"
/>
</div>
<CardText type={'description'}>{content}</CardText>
<CardText type={'description'} className="line-clamp-3">
{content}
</CardText>
</CardFlex>
<CardFlex className="w-12" justify={'center'}>
<div className="w-2.5 h-2.5 relative">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const MyCardDescriptionSection = ({
gap={'space'}
className="w-full h-full"
>
<div className="relative w-1/3 h-full">
<div className="relative h-full min-w-[128px]">
<CardImage
className="border rounded-lg border-background-secondary-color"
src={thumbnail}
Expand All @@ -47,13 +47,10 @@ const MyCardDescriptionSection = ({
direction={'col'}
// justify={'between'}
gap={'space'}
className="w-2/3 h-full"
className="w-full h-full"
>
<CardFlex align={'center'} gap={'space'}>
<CardText
type={'title'}
className="overflow-hidden whitespace-nowrap overflow-ellipsis"
>
<CardText type={'title'} className="line-clamp-1">
{cardTitle}
</CardText>
{status === 'TRADE_AVAILABLE' ? (
Expand All @@ -62,10 +59,7 @@ const MyCardDescriptionSection = ({
<ReservedBadge />
)}
</CardFlex>
<CardText
type={'description'}
className="overflow-hidden whitespace-nowrap overflow-ellipsis"
>
<CardText type={'description'} className="line-clamp-1">
{itemName}
</CardText>
<hr className="my-1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const SuggestionButtons = ({
gap={'space'}
>
<Image src={Assets.checkCircle} alt="check-circle" />
<CardText>수락</CardText>
<CardText className="break-keep">수락</CardText>
</CardFlex>
<CardFlex
onClick={() => {
Expand All @@ -38,7 +38,7 @@ const SuggestionButtons = ({
gap={'space'}
>
<Image src={Assets.quitCircle} alt="check-circle" />
<CardText>거절</CardText>
<CardText className="break-keep">거절</CardText>
</CardFlex>
</>
)
Expand Down Expand Up @@ -115,7 +115,7 @@ const MySuggestionCard = ({
className="h-full"
>
<div
className="relative h-full w-36 cursor-pointer"
className="relative h-full min-w-[128px] cursor-pointer"
onClick={() => {
router.push(AppPath.card(String(cardId)))
}}
Expand All @@ -132,7 +132,7 @@ const MySuggestionCard = ({
<CardFlex
direction={'col'}
justify={'between'}
className="w-2/3 h-full"
className="w-full h-full"
>
<CardText type={'title'} className="line-clmap-1">
{cardTitle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ const SubCard = ({
/>
</div>
<CardText
title={itemName}
type={'description'}
className="font-bold whitespace-nowrap overflow-hidden overflow-ellipsis"
className="w-20 font-bold text-center whitespace-nowrap overflow-hidden overflow-ellipsis"
>
{itemName}
</CardText>
Expand Down
16 changes: 5 additions & 11 deletions src/components/domain/card/trade-status-card/TradeStatusCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ const TradeStatusCard = ({
gap={'space'}
className="h-full"
>
<div className="relative w-32 h-full">
<div className="relative min-w-[128px] h-full">
<CardImage
src={thumbnail}
alt="이미지가 없습니다."
alt="물건 이미지"
layout="fill"
objectFit="cover"
/>
Expand All @@ -47,13 +47,10 @@ const TradeStatusCard = ({
<CardFlex
direction={'col'}
justify={'between'}
className="w-2/3 h-full"
className="w-full h-full"
>
<CardFlex align={'center'} gap={'space'}>
<CardText
type={'title'}
className="overflow-hidden whitespace-nowrap overflow-ellipsis"
>
<CardText type={'title'} className="line-clamp-1">
{cardTitle}
</CardText>
{status === 'TRADE_AVAILABLE' ? (
Expand All @@ -62,10 +59,7 @@ const TradeStatusCard = ({
<ReservedBadge />
)}
</CardFlex>
<CardText
type={'description'}
className="overflow-hidden whitespace-nowrap overflow-ellipsis"
>
<CardText type={'description'} className="line-clamp-1">
{itemName}
</CardText>
<CardText type={'description'}>
Expand Down
10 changes: 9 additions & 1 deletion src/components/domain/exception-boundary/ExceptionBoundary.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import router from 'next/router'
import Loading from '@/app/loading'
import NoData from '../no-data'

type ExceptionBoundaryProps = {
isLoading: boolean
Expand All @@ -24,7 +26,13 @@ const ExceptionBoundary: React.FC<ExceptionBoundaryProps> = ({
}

if (isEmpty) {
return <div>데이터 없음!</div>
return (
<NoData
title="해당 물건이 존재 하지 않습니다."
onClickButton={() => router.push('/cards/new')}
buttonContent="물건 등록하러 가기"
/>
)
}

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/domain/page-title/PageTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const PageTitle = ({ title }: { title: string }) => {
className="flex items-center justify-start cursor-pointer"
onClick={() => router.back()}
/>
<h2 className="flex items-center justify-center text-xl font-bold">
<h2 className="flex items-center justify-center text-xl font-bold whitespace-nowrap">
{title}
</h2>
<div></div>
Expand Down
Loading