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

๐ŸŽ‰ TradeStateCard ์ปดํฌ๋„ŒํŠธ ๊ตฌํ˜„ #24

Merged
merged 7 commits into from
Nov 1, 2023

Conversation

doggopawer
Copy link
Contributor

- ๋ชฉ์ 

=> ๋ฌผ๊ฑด ๋ฆฌ์ŠคํŠธ ์กฐํšŒ ํŽ˜์ด์ง€์—์„œ ์‚ฌ์šฉํ•  ๊ฑฐ๋ž˜์ƒํƒœ๋ฅผ ํฌํ•จํ•˜๊ณ  ์žˆ๋Š” ์นด๋“œ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ํ•„์š”ํ•ด ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.
๊ด€๋ จ ํ‹ฐ์ผ“ ๋ฒˆํ˜ธ: 60


- ์ฃผ์š” ๋ณ€๊ฒฝ ์‚ฌํ•ญ

๊ธฐํƒ€ ์‚ฌํ•ญ (์„ ํƒ)


- ์Šคํฌ๋ฆฐ์ƒท (์„ ํƒ)

@doggopawer doggopawer changed the title Nabi 60 ๐ŸŽ‰ TradeStateCard ์ปดํฌ๋„ŒํŠธ ๊ตฌํ˜„ Nov 1, 2023
@doggopawer doggopawer self-assigned this Nov 1, 2023
@doggopawer doggopawer added the D-0 label Nov 1, 2023
@@ -0,0 +1,59 @@
import formatDistanceToNow from 'date-fns/formatDistanceToNow'
Copy link
Contributor

Choose a reason for hiding this comment

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

์ฝ”๋”ฉ์ปจ๋ฒค์…˜ ์ •ํ•œ๊ฑฐ ๋‹ค์‹œ๋ณด๋‹ˆ๊นŒ ์ €ํฌ ํด๋”๋ช…์€ ์ผ€๋ฐฅ์œผ๋กœ ํ•˜๊ธฐ๋กœ ํ–ˆ๋”๋ผ๊ณ ์š”!! ์ €๋„ ๊ทธ๋ž˜์„œ suggest-card๋กœ ํด๋”๋ช… ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค!

Copy link
Collaborator

@oaoong oaoong Nov 1, 2023

Choose a reason for hiding this comment

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

์™€ ๊ทธ๋Ÿฌ๋„ค์š”? ์ €๋„ PR ๋”ฐ๋กœ ํ•ด์„œ ์‹น ๋ฐ”๊ฟ”์•ผ๊ฒ ์–ด์š”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

์•„ ๊ทธ๋Ÿฌ๋„ค์š” ใ… ใ… 

@@ -0,0 +1,12 @@
export type Item = {
Copy link
Contributor

Choose a reason for hiding this comment

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

์„œ๋ฒ„์—์„œ ๋‚ด๋ ค์ฃผ๋Š” data๋“ค์— ๋Œ€ํ•œ ๊ฒฝ์šฐ๋Š” interface๋กœ ํ•˜๊ธฐ๋กœ ํ–ˆ์—ˆ์–ด์š”!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

๋ฐ˜๋Œ€๋กœ ์•Œ๊ณ  ์žˆ์—ˆ๋„ค์š” ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค

<CardFlex direction={'col'} justify={'between'} className="h-full">
<CardFlex align={'center'} gap={'space'}>
<CardText type={'title'}>{cardTitle}</CardText>
{renderBadgeByTradeState(tradeState)}
Copy link
Contributor

Choose a reason for hiding this comment

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

์ €๋Š” ์กฐ๊ฑด๋ถ€๋ Œ๋”๋งํ•  ๋•Œ ์‚ผํ•ญ์—ฐ์‚ฐ์ž ์ด์šฉํ•ด์„œ ๋ Œ๋”๋งํ•˜๋Š”๊ฒŒ ์ต์ˆ™ํ•œ๋ฐ ์ด๋ ‡๊ฒŒ ํ•จ์ˆ˜๋กœ ๋”ฐ๋กœ ๋‹ด์•„๋‘๋ฉด ์–ด๋–ค ์ด์ ์ด ์žˆ๋‚˜์š”??? ์ €๋Š” ์ต์ˆ™ํ•˜์ง€ ์•Š์€ ๋ฐฉ๋ฒ•์ด๋ผ ํ˜ธ๊ธฐ์‹ฌ์— ์—ฌ์ญค๋ด…๋‹ˆ๋‹ค! ๊ถ๊ธˆ ๐Ÿค”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

๊ฑฐ๋ž˜์ƒํƒœ์— ๋”ฐ๋ผ ๋ฑƒ์ง€๋ฅผ ๋‹ค๋ฅด๊ฒŒ ๋ Œ๋”๋งํ•˜๋Š” ๊ธฐ๋Šฅ์„ ๋ฌธ์žฅ์„ ์ฝ์œผ๋ฉด ๋ฐ”๋กœ ์•Œ์ˆ˜ ์žˆ์–ด์„œ ์ €๋ ‡๊ฒŒ ํ•ด๋†จ๋Š”๋ฐ
์‚ฌ์‹ค ์–ด๋–ป๊ฒŒ ํ•˜๋“  ์ƒ๊ด€ ์—†๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์ด๋ถ€๋ถ„๋„ ๋…ผ์˜๊ฐ€ ํ•„์š”ํ• ๊นŒ์š”?

@@ -0,0 +1,59 @@
import formatDistanceToNow from 'date-fns/formatDistanceToNow'
Copy link
Collaborator

@oaoong oaoong Nov 1, 2023

Choose a reason for hiding this comment

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

์™€ ๊ทธ๋Ÿฌ๋„ค์š”? ์ €๋„ PR ๋”ฐ๋กœ ํ•ด์„œ ์‹น ๋ฐ”๊ฟ”์•ผ๊ฒ ์–ด์š”

Comment on lines 15 to 23
const getStyleByTradeState = (tradeState: string) =>
tradeState === 'possible' ? 'primary' : 'secondary'
const getTextByTradeState = (tradeState: string) =>
tradeState === 'possible' ? '๊ฑฐ๋ž˜๊ฐ€๋Šฅ' : '์˜ˆ์•ฝ์ค‘'
const renderBadgeByTradeState = (tradeState: string) => (
<Badge variant={getStyleByTradeState(tradeState)} size={'sm'}>
{getTextByTradeState(tradeState)}
</Badge>
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

const badgeVariant = {
    possible: {
        style: 'primary',
        text: '๊ฑฐ๋ž˜๊ฐ€๋Šฅ'
    },
    booked: {
        style: 'secondary',
        text: '์˜ˆ์•ฝ์ค‘'
    }
}

const getBadgeByType = (tradeState: 'possible' | 'booked') => (
    <Badge variant={badgeVariant[tradeState].style}>
        {badgeVariant[tradeState].text}
    </Badge>
)

์ด๋Ÿฐ ์‹์€ ์–ด๋–จ๊นŒ์š”?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

์ข‹๋„ค์š” map์„ ์“ธ๊นŒ ๊ณ ๋ฏผ์„ ํ•˜๋‹ค๊ฐ€, ์ƒํƒœ๊ฐ€ ๋‘๊ฐœ๋ผ ์ฃผ์ €ํ–ˆ๋Š”๋ฐ ์ค‘์ฒฉ๋œ map์ด๋ฉด ์•ˆ์“ธ์ด์œ ๊ฐ€ ์—†๊ฒ ๋„ค์š”

Comment on lines 27 to 33
<CardFlex
direction={'row'}
justify={'start'}
align={'center'}
gap={'space'}
className="h-full"
>
Copy link
Collaborator

Choose a reason for hiding this comment

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

ํ˜น์‹œ cardFlex๋Š” ์–ด๋–ค ์šฉ๋„์ผ๊นŒ์š”??

Copy link
Contributor Author

@doggopawer doggopawer Nov 1, 2023

Choose a reason for hiding this comment

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

flex box๋ฅผ ๋‚˜๋ฆ„ ํŽธํ•˜๊ฒŒ ์“ฐ๋ ค๊ณ  ์ •์˜ํ–ˆ๋Š”๋ฐ, ์จ๋ณด๋‹ˆ ๊ตณ์ด ์‹ถ์€ ๋ถ€๋ถ„์ด ์žˆ๋Š” ๊ฒƒ ๊ฐ™๋„ค์š”.

@doggopawer doggopawer merged commit b9f25bc into develop Nov 1, 2023
2 checks passed
@doggopawer doggopawer deleted the NABI-60 branch November 1, 2023 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants