Skip to content

Commit 09ddcb7

Browse files
committed
Fix: 기타 컴포넌트 import문 수정
1 parent fccf9dc commit 09ddcb7

16 files changed

Lines changed: 69 additions & 45 deletions

File tree

src/components/BottomButton/dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export interface BottomButtonProps {
2-
content: String;
2+
content: string;
33
onClick: () => void;
44
disabled?: boolean;
55
}

src/components/BottomButton/index.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
import React from 'react';
1+
import { StyledText } from '@components/Text/StyledText';
2+
3+
import type { BottomButtonProps } from './dto';
4+
25
import { ButtonWrapper, Button } from './styles';
3-
import { StyledText } from '../Text/StyledText';
4-
import { BottomButtonProps } from './dto';
56

67
const BottomButton: React.FC<BottomButtonProps> = ({ content, onClick, disabled = false }) => {
78
return (
8-
<>
9-
<ButtonWrapper>
10-
<Button onClick={onClick} disabled={disabled}>
11-
<StyledText $textTheme={{ style: 'body1-regular', lineHeight: 2 }}>{content}</StyledText>
12-
</Button>
13-
</ButtonWrapper>
14-
</>
9+
<ButtonWrapper>
10+
<Button onClick={onClick} disabled={disabled}>
11+
<StyledText $textTheme={{ style: 'body1-regular', lineHeight: 2 }}>{content}</StyledText>
12+
</Button>
13+
</ButtonWrapper>
1514
);
1615
};
1716

src/components/ClothingInfoItem/dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { PostClothing } from '../../apis/post/dto';
1+
import type { PostClothing } from '@apis/post/dto';
22

3-
export interface ClothingInfo extends PostClothing {}
3+
export type ClothingInfo = PostClothing;
44

55
export interface ClothingInfoItemProps {
66
clothingObj: ClothingInfo;

src/components/ClothingInfoItem/index.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import React from 'react';
2-
import { StyledText } from '../Text/StyledText';
3-
import X from '../../assets/default/x.svg';
4-
import Right from '../../assets/arrow/right.svg';
5-
import { ClothingInfoItemProps } from './dto';
1+
import Right from '@assets/arrow/right.svg';
2+
import X from '@assets/default/x.svg';
3+
4+
import { StyledText } from '@components/Text/StyledText';
5+
6+
import type { ClothingInfoItemProps } from './dto';
7+
68
import { ClothingInfoItemContainer, ClothingInfoLeft, ClothingImage, ClothingInfoRight, ClothingModel } from './styles';
79

810
const ClothingInfoItem: React.FC<ClothingInfoItemProps> = ({ clothingObj, onDelete }) => {

src/components/ClothingInfoItem/styles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { styled } from 'styled-components';
22

3-
import { StyledText } from '../../components/Text/StyledText';
3+
import { StyledText } from '@components/Text/StyledText';
44

55
export const ClothingInfoItemContainer = styled.li`
66
position: relative;

src/components/ConfirmationModal/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
import { StyledText } from '../Text/StyledText';
2-
import theme from '../../styles/theme';
1+
import theme from '@styles/theme';
2+
3+
import { StyledText } from '@components/Text/StyledText';
4+
5+
import type { ConfirmationModalProps } from './dto';
6+
37
import { ConfirmationModalLayout, ConfirmationModalWrapper, ContentBox, ButtonContainer, Button } from './styles';
4-
import { ConfirmationModalProps } from './dto';
58

69
const ConfirmationModal: React.FC<ConfirmationModalProps> = ({
710
content,

src/components/Frame/Frame.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { styled } from 'styled-components';
2+
23
import theme from '@styles/theme';
34

45
export const OODDFrame = styled.div`

src/components/Loading/styles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { styled }, { keyframes } from 'styled-components';
1+
import { styled, keyframes } from 'styled-components';
22

33
const bounceGroup = keyframes`
44
0%, 50%, 100% {

src/components/Modal/index.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
import React from 'react';
2-
import ReactDOM from 'react-dom';
3-
import { ModalWrapper, ModalContainer, CloseButton, ConfirmButton } from './styles';
1+
import { createPortal } from 'react-dom';
2+
3+
import closeIcon from '@assets/default/x.svg';
4+
45
import { StyledText } from '@components/Text/StyledText';
6+
57
import type { ModalProps } from './dto';
6-
import closeIcon from '@assets/default/x.svg';
8+
9+
import { ModalWrapper, ModalContainer, CloseButton, ConfirmButton } from './styles';
710

811
const Modal: React.FC<ModalProps> = ({ isCloseButtonVisible, onClose, content, button }) => {
912
const handleBackgroundClick = (e: React.MouseEvent) => {
@@ -21,7 +24,7 @@ const Modal: React.FC<ModalProps> = ({ isCloseButtonVisible, onClose, content, b
2124
}
2225
};
2326

24-
return ReactDOM.createPortal(
27+
return createPortal(
2528
<ModalWrapper onClick={handleBackgroundClick}>
2629
<ModalContainer $isCloseButtonVisible={isCloseButtonVisible || false}>
2730
{isCloseButtonVisible && (

src/components/NavBar/index.tsx

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1-
import React, { useEffect, useState } from 'react';
1+
import { useEffect, useState } from 'react';
22
import { useLocation, useNavigate } from 'react-router-dom';
3+
4+
import theme from '@styles/theme';
5+
6+
import { getCurrentUserId } from '@utils/getCurrentUserId';
7+
8+
import logout from '@assets/default/leave.svg';
9+
import logo from '@assets/default/oodd.svg';
10+
11+
import Alarm from '@components/Icons/Alarm';
12+
import Home from '@components/Icons/Home';
13+
import Message from '@components/Icons/Message';
14+
import MyPage from '@components/Icons/MyPage';
15+
16+
import Modal from '@components/Modal';
17+
import { StyledText } from '@components/Text/StyledText';
18+
19+
import type { ModalProps } from '@components/Modal/dto';
20+
321
import {
422
NavBarContainer,
523
NavBarWrapper,
@@ -12,17 +30,6 @@ import {
1230
SideNavBarFooter,
1331
Icon,
1432
} from './styles';
15-
import Message from '@components/Icons/Message';
16-
import Home from '@components/Icons/Home';
17-
import MyPage from '@components/Icons/MyPage';
18-
import Alarm from '@components/Icons/Alarm';
19-
import logo from '@assets/default/oodd.svg';
20-
import logout from '@assets/default/leave.svg';
21-
import { StyledText } from '@components/Text/StyledText';
22-
import Modal from '@components/Modal';
23-
import type { ModalProps } from '@components/Modal/dto';
24-
import { getCurrentUserId } from '@utils/getCurrentUserId';
25-
import theme from '@styles/theme';
2633

2734
const NavBar: React.FC = () => {
2835
const [isLogoutModalOpen, setIsLogoutModalOpen] = useState(false);

0 commit comments

Comments
 (0)