Skip to content

Commit 388ab00

Browse files
committed
fix: tsc error & lint error
1 parent 06f235a commit 388ab00

7 files changed

Lines changed: 13 additions & 24 deletions

File tree

โ€Žsrc/features/post/components/StepFunnel/Step3/index.tsxโ€Ž

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { useStep3Store } from '@/features/post/stores/Step3Store';
77
import { useStep1Store } from '@/features/post/stores/Step1Store';
88

99
const Location = () => {
10-
1110
const locationStore = useStep3Store(state => state.location);
1211
const locationSetter = useStep3Store(state => state.setLocation);
1312

@@ -19,7 +18,7 @@ const Location = () => {
1918
</div>
2019
</div>
2120
);
22-
}
21+
};
2322

2423
const Address = () => {
2524
// TODO: ์ˆ˜์ •ํ•˜๊ธฐ,,,
@@ -34,14 +33,14 @@ const Address = () => {
3433
</div>
3534
</div>
3635
);
37-
}
36+
};
3837

3938
const Step3 = () => {
4039
const tradeMethodStore = useStep3Store(state => state.tradeMethods);
4140
const tradeMethodSetter = useStep3Store(state => state.setTradeMethods);
4241

43-
const isDirect = tradeMethodStore.includes('DIRECT')
44-
const isParcel = tradeMethodStore.includes('PARCEL')
42+
const isDirect = tradeMethodStore.includes('DIRECT');
43+
const isParcel = tradeMethodStore.includes('PARCEL');
4544
const isRental = useStep1Store(state => state.transactionTypes).includes('RENTAL');
4645

4746
const handleSelectType = (type: TradeMethods) => {

โ€Žsrc/features/post/components/TagIcon/index.tsxโ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import HockeyIcon from '@/libs/assets/HockeyIcon';
22
import { ICON_MAP } from '@/libs/constants/iconMap';
3-
import type { ProductType, TradeType, TransactionType } from '@/libs/types/item';
3+
import type { ProductType, TradeMethods, TransactionType } from '@/libs/types/item';
44

55
interface TagIconProps {
66
className?: string;
7-
type: ProductType | TransactionType | TradeType;
7+
type: ProductType | TransactionType | TradeMethods;
88
}
99
export const TagIcon = ({ className, type }: TagIconProps) => {
1010
if (type === 'HOCKEY')

โ€Žsrc/features/post/components/WriteLayout/header.tsxโ€Ž

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ const Header = () => {
1616
const isStep4Empty = useStep4Store(state => state.isEmpty());
1717

1818
// ๋ชจ๋‘ ๋‹ค ๋น„์›Œ์ ธ ์žˆ์œผ๋ฉด alert๋ฅผ ๋„์šฐ์ง€ ๋ง์•„์•ผ ํ•œ๋‹ค
19-
const shouldShow = !(isStep1Empty
20-
&& isStep2Empty
21-
&& isStep3Empty
22-
&& isStep4Empty);
19+
const shouldShow = !(isStep1Empty && isStep2Empty && isStep3Empty && isStep4Empty);
2320

2421
const navigator = useNavigate();
2522

โ€Žsrc/features/post/components/WriteLayout/navigator.tsxโ€Ž

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,7 @@ const Navigator = ({ totalSteps, currentStep, goNext, goPrev, isFirst, isLast }:
2424
const isStep4Valid = useStep4Store(state => state.isBtnValid());
2525
const isStep5Valid = useStep5Store(state => state.isBtnValid());
2626

27-
const isBtnValids = [
28-
isStep1Valid,
29-
isStep2Valid,
30-
isStep3Valid,
31-
isStep4Valid,
32-
isStep5Valid,
33-
true,
34-
];
27+
const isBtnValids = [isStep1Valid, isStep2Valid, isStep3Valid, isStep4Valid, isStep5Valid, true];
3528

3629
const label = isLast ? '์™„๋ฃŒ' : '๋‹ค์Œ';
3730
const isBtnValid = isBtnValids[currentStep - 1]; // ํ˜„์žฌ ์Šคํ…์˜ ์œ ํšจ์„ฑ

โ€Žsrc/features/post/stores/Step4Store.tsโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const useStep4Store = create<Step4Store>((set, get) => ({
3232
const { size, color, quality } = get();
3333
return size === null && color === null && quality === null;
3434
},
35-
reset: () => {
35+
reset: () => {
3636
set({
3737
size: null,
3838
color: null,

โ€Žsrc/libs/constants/colorMap.tsโ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { ColorType } from '@/libs/types/item';
1+
import type { Color } from '@/libs/types/item';
22

3-
export const COLOR_MAP: Record<ColorType, string> = {
3+
export const COLOR_MAP: Record<Color, string> = {
44
CRIMSON: '#C30003',
55
BLACK: 'black',
66
WHITE: '#F2F2F2',

โ€Žsrc/libs/constants/iconMap.tsxโ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { ProductType, TradeType, TransactionType } from '@/libs/types/item';
1+
import type { ProductType, TradeMethods, TransactionType } from '@/libs/types/item';
22

3-
export const ICON_MAP: Record<Exclude<ProductType, 'HOCKEY'> | TransactionType | TradeType, string> = {
3+
export const ICON_MAP: Record<Exclude<ProductType, 'HOCKEY'> | TransactionType | TradeMethods, string> = {
44
SOCCER: 'mgc_football_fill',
55
BASKETBALL: 'mgc_basketball_fill',
66
BASEBALL: 'mgc_baseball_fill',

0 commit comments

Comments
ย (0)