Skip to content

Commit cbcb2c0

Browse files
committed
style: 코드 정리
1 parent facdf92 commit cbcb2c0

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/components/UI/ImageUpload.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { useState, useEffect } from 'react';
2-
import PlusIcon from '../../assets/images/icons/ic_plus.svg';
32
import styled from 'styled-components';
3+
44
import { ColorTypes, FontTypes } from '../../styles/theme';
55
import { applyFontStyles } from '../../styles/mixins';
6+
7+
import PlusIcon from '../../assets/images/icons/ic_plus.svg';
68
import XIcon from '../../assets/images/icons/ic_X.svg';
79

810
function ImageUpload() {

src/components/UI/Taginput.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ function TagInput({ tags, setTags }) {
1212
if (e.key === 'Enter') {
1313
const trimmed = inputValue.trim();
1414
if (trimmed === '') return;
15+
1516
const newTag = `#${trimmed}`;
1617
if (tags.includes(newTag)) return;
18+
1719
setTags([...tags, newTag]);
1820
setInputValue('');
1921
}
@@ -26,6 +28,7 @@ function TagInput({ tags, setTags }) {
2628
return (
2729
<Container>
2830
<label htmlFor="tag">태그</label>
31+
2932
<Wrapper>
3033
<input
3134
id="tag"
@@ -35,6 +38,7 @@ function TagInput({ tags, setTags }) {
3538
value={inputValue}
3639
onChange={(e) => setInputValue(e.target.value)}
3740
/>
41+
3842
<TagList>
3943
{tags.map((tag) => (
4044
<TagWrapper key={tag}>

src/components/pages/AddItemPage/AddItemPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { useState } from 'react';
33

44
import InputField from '../../UI/InputField';
55
import ImageUpload from '../../UI/ImageUpload';
6-
import { ColorTypes } from '../../../styles/theme';
76
import TagInput from '../../UI/Taginput';
7+
import { ColorTypes } from '../../../styles/theme';
88

99
function AddItemPage() {
1010
const [name, setName] = useState('');

0 commit comments

Comments
 (0)