Skip to content

Commit a69d10e

Browse files
authored
Merge pull request #215 from DevKor-github/feat/notification-no-result
feat: μ•Œλ¦Ό 없을 λ•Œ λ„μ›Œμ£ΌλŠ” ν™”λ©΄ / fix: λ‚˜μ˜ νŒλ§€λ‚΄μ—­ width μˆ˜μ •
2 parents 2c6700b + 7583f4f commit a69d10e

5 files changed

Lines changed: 13 additions & 8 deletions

File tree

β€Žsrc/common/components/NoResult/index.tsxβ€Ž

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { cx } from '@styled-system/css';
33
import * as s from './style.css';
44

55
interface Props {
6-
type: 'search' | '404' | 'like' | 'chat' | 'pick' | 'chat-list';
6+
type: 'search' | '404' | 'like' | 'chat' | 'pick' | 'chat-list' | 'notification' | 'my-trade';
77
}
88
const NoResult = ({ type }: Props) => {
99
const icon = type === 'search' ? 'mgc_alert_fill' : 'mgc_puzzled_fill';
@@ -14,6 +14,8 @@ const NoResult = ({ type }: Props) => {
1414
if (type === 'chat') return '아직 μ‹œμž‘λœ λŒ€ν™”κ°€ μ—†μ–΄μš”!';
1515
if (type === 'chat-list') return '아직 μ‹œμž‘λœ λŒ€ν™”κ°€ μ—†μ–΄μš”!';
1616
if (type === 'pick') return '아직 μƒμ„±λœ PICK이 μ—†μ–΄μš”!';
17+
if (type === 'notification') return '아직 μ•Œλ¦Όμ΄ μ—†μ–΄μš”!';
18+
if (type === 'my-trade') return '아직 λ“±λ‘ν•œ μƒν’ˆμ΄ μ—†μ–΄μš”!';
1719
return '아직 관심λͺ©λ‘μ΄ μ—†μ–΄μš”!';
1820
})();
1921

@@ -22,7 +24,9 @@ const NoResult = ({ type }: Props) => {
2224
if (type === '404') return 'λ‹€λ₯Έ 경둜둜 접속해 μ£Όμ„Έμš”.';
2325
if (type === 'chat') return 'μƒν’ˆμ— 관심 μžˆλŠ” μ‚¬λžŒμ΄ λ‚˜νƒ€λ‚˜λ©΄\nμ±„νŒ…μ„ 주고받을 수 μžˆμŠ΅λ‹ˆλ‹€.';
2426
if (type === 'chat-list') return 'μ±„νŒ…μ„ μ‹œμž‘ν•΄ λ³΄μ„Έμš”.';
25-
if (type === 'pick') return '약속을 생성해 λ³΄μ„Έμš”.';
27+
if (type === 'pick') return 'PICK을 생성해 λ³΄μ„Έμš”.';
28+
if (type === 'notification') return 'PICK을 생성해 λ³΄μ„Έμš”.';
29+
if (type === 'my-trade') return 'μƒν’ˆμ„ 등둝해 λ³΄μ„Έμš”.';
2630
return 'μ›ν•˜λŠ” μƒν’ˆμ„ 관심λͺ©λ‘μ— λ‹΄μ•„ λ³΄μ„Έμš”.';
2731
})();
2832

β€Žsrc/features/myTrade/components/myTradeItemList/index.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const UserItemList = ({ userId }: Props) => {
2424
<div className={s.Content({ isEmpty })}>
2525
{isEmpty ? (
2626
<div className={s.NoResult}>
27-
<NoResult type="like" />
27+
<NoResult type="my-trade" />
2828
<Btn mode="main" className={s.Button} onClick={() => navigate('/')}>
2929
ν™ˆμœΌλ‘œ λŒμ•„κ°€κΈ°
3030
</Btn>

β€Žsrc/features/myTrade/components/myTradeItemList/style.css.tsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const Content = cva({
3838
p: '1rem',
3939
overflowY: 'auto',
4040
gap: '1rem',
41+
w: '100%',
4142
},
4243
variants: {
4344
isEmpty: {

β€Žsrc/features/pickList/components/PickItemList/index.tsxβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Btn from '../Btn';
77
import type { AppointmentInterface } from '../../types';
88
import { Link } from 'react-router';
99
import { parsePickDate } from '@/common/utils/parseDate';
10-
import { isBefore } from 'date-fns';
10+
// import { isBefore } from 'date-fns';
1111

1212
interface PickItemListProps {
1313
data: AppointmentInterface;
@@ -18,9 +18,9 @@ const PickItemList = ({ data }: PickItemListProps) => {
1818
const isRental = data.type === 'RENTAL';
1919
const isSale = data.type === 'SALE';
2020

21-
const currentDate = new Date(); // ν˜„μž¬ μ‹œκ°„
22-
const tradeData = isRental ? data.returnDate : data.rentalDate; // 거래 μ‹€μ œ μ‹œκ°„
23-
const isComplete = isBefore(tradeData, currentDate); // 거래 μ‹€μ œ μ‹œκ°„μ΄ λ„λž˜ν–ˆλŠ”μ§€ -> 거래 μ™„λ£Œ λ²„νŠΌ ν™œμ„±ν™”
21+
// const currentDate = new Date(); // ν˜„μž¬ μ‹œκ°„
22+
// const tradeData = isRental ? data.returnDate : data.rentalDate; // 거래 μ‹€μ œ μ‹œκ°„
23+
// const isComplete = isBefore(tradeData, currentDate); // 거래 μ‹€μ œ μ‹œκ°„μ΄ λ„λž˜ν–ˆλŠ”μ§€ -> 거래 μ™„λ£Œ λ²„νŠΌ ν™œμ„±ν™”
2424

2525
const isSuccess = data.state === 'SUCCESS'; // 거래 μ‹€μ œλ‘œ μ™„λ£ŒλλŠ”μ§€ -> 거래 μ‹€μ œ μ‹œκ°„ 이후에 거래 μ™„λ£Œ λ²„νŠΌμ„ λˆŒλ €κ±°λ‚˜, 24μ‹œκ°„μ΄ μ§€λ‚¬κ±°λ‚˜ (μ„œλ²„μ—μ„œ λ‚΄λ €μ€Œ)
2626
const tradeDate = parsePickDate(data.rentalDate);

β€Žsrc/pages/NotificationPage/index.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const NotigicationPage = () => {
2424
<div className={s.Content({ isEmpty })}>
2525
{isEmpty ? (
2626
<div className={s.NoResult}>
27-
<NoResult type="like" />
27+
<NoResult type="notification" />
2828
<Btn mode="main" className={s.Button} onClick={() => navigate('/')}>
2929
ν™ˆμœΌλ‘œ λŒμ•„κ°€κΈ°
3030
</Btn>

0 commit comments

Comments
Β (0)