-
Notifications
You must be signed in to change notification settings - Fork 0
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
feature: 아이템 페이지 퍼블리싱 #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Card 컴포넌트 PR은 별다른 사항 없으면 close 처리해두어도 괜찮을 것 같음.
오케이~
깔꼼한데? DDb👍 any만 일단 고쳐주면 바로 merge 하면 될거같아
interface ItemSlideProps { | ||
items: ItemType[]; | ||
activeIndex: number; | ||
setActiveIndex: React.Dispatch<React.SetStateAction<number>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요런거 React.
-> 나중에 React안붙이는 방식으로 Ex) Dispatch<SetStateAction<number>>
로 바꾸면 좋을듯!
const [image, setImage] = useState<any>(null); | ||
|
||
const handleClick = () => { | ||
if (inputRef.current) { | ||
inputRef.current.click(); | ||
} | ||
}; | ||
|
||
const handleFileUpload = async (e: React.ChangeEvent<HTMLInputElement>) => { | ||
if (e.target.files !== null) { | ||
const file = e.target.files[0]; | ||
const convertedImage = await convertImageToBase64(file); | ||
setImage(convertedImage); | ||
// Upload API 연결 | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any 안쓰고 요렇게 타입가드써서 하는게 타입 안전성에 더 좋을듯! 로컬에서 되는거 확인했어 :)
const [image, setImage] = useState<any>(null); | |
const handleClick = () => { | |
if (inputRef.current) { | |
inputRef.current.click(); | |
} | |
}; | |
const handleFileUpload = async (e: React.ChangeEvent<HTMLInputElement>) => { | |
if (e.target.files !== null) { | |
const file = e.target.files[0]; | |
const convertedImage = await convertImageToBase64(file); | |
setImage(convertedImage); | |
// Upload API 연결 | |
} | |
}; | |
const [image, setImage] = useState<string | null>(null); | |
const handleClick = () => { | |
if (inputRef.current) { | |
inputRef.current.click(); | |
} | |
}; | |
const handleFileUpload = async (e: React.ChangeEvent<HTMLInputElement>) => { | |
if (e.target.files !== null) { | |
const file = e.target.files[0]; | |
const convertedImage = await convertImageToBase64(file); | |
if (typeof convertedImage === 'string') { | |
setImage(convertedImage); | |
} | |
// Upload API 연결 | |
} | |
}; |
const [image, setImage] = useState<any>(item.image); | ||
|
||
const handleClick = () => { | ||
if (inputRef.current) { | ||
inputRef.current.click(); | ||
} | ||
}; | ||
|
||
const handleFileUpload = async (e: React.ChangeEvent<HTMLInputElement>) => { | ||
if (e.target.files !== null) { | ||
const file = e.target.files[0]; | ||
const convertedImage = await convertImageToBase64(file); | ||
setImage(convertedImage); | ||
// Upload API 연결 | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요기도 any 안쓰고 요렇게 하면 될듯!
const [image, setImage] = useState<any>(item.image); | |
const handleClick = () => { | |
if (inputRef.current) { | |
inputRef.current.click(); | |
} | |
}; | |
const handleFileUpload = async (e: React.ChangeEvent<HTMLInputElement>) => { | |
if (e.target.files !== null) { | |
const file = e.target.files[0]; | |
const convertedImage = await convertImageToBase64(file); | |
setImage(convertedImage); | |
// Upload API 연결 | |
} | |
}; | |
const [image, setImage] = useState<string>(item.image); | |
const handleClick = () => { | |
if (inputRef.current) { | |
inputRef.current.click(); | |
} | |
}; | |
const handleFileUpload = async (e: React.ChangeEvent<HTMLInputElement>) => { | |
if (e.target.files !== null) { | |
const file = e.target.files[0]; | |
const convertedImage = await convertImageToBase64(file); | |
if (typeof convertedImage === 'string') { | |
setImage(convertedImage); | |
} | |
// Upload API 연결 | |
} | |
}; |
src/pages/user/[id]/item/index.tsx
Outdated
{isEdit ? ( | ||
<Link href={`${router.pathname}/edit`}> | ||
<Icon iconType='Edit' color='white' /> | ||
</Link> | ||
) : ( | ||
<></> | ||
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요렇게도 될려나??
{isEdit ? ( | |
<Link href={`${router.pathname}/edit`}> | |
<Icon iconType='Edit' color='white' /> | |
</Link> | |
) : ( | |
<></> | |
)} | |
{isEdit && ( | |
<Link href={`${router.pathname}/edit`}> | |
<Icon iconType='Edit' color='white' /> | |
</Link> | |
)} |
1f1afd2
to
de23d7c
Compare
@asdf99245 이거 반영하구 디자인 시안 반영한 뒤에 바로 합치겠슴다! 근데 아마 내일 작업 예정 :( |
Good 천천히 해 :) |
@asdf99245 말해준 부분 수정 완료! 합칠게요우 |
👀 What is this PR?
📝 Changes
📌 Related issue(s)
📷 Attachment(optional)