Skip to content

Commit

Permalink
kdt-8-4#14 디테일 코드 재수정 필요함 kdt-8-4#33 댓글 로그인 상태 아닌 경우 처리함
Browse files Browse the repository at this point in the history
  • Loading branch information
kr-nius committed Apr 10, 2024
1 parent da87516 commit de25388
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { CheckStore } from '@/Store/Check'
import ButtonStore, { ButtonStyle } from '../../Atoms/Button/ButtonStore'
import InputStore, { InputStyle } from '../../Atoms/Input/InputStore'

Expand All @@ -20,24 +21,33 @@ export default function CommentInput({
style,
inputStyle,
}: Props) {
const { check } = CheckStore()
return (
<form className={style} onSubmit={handleSubmit}>
<InputStore
inputStyle={InputStyle.INPUT_WHITE}
inputType="text"
placeholderContents={place}
style={inputStyle}
onChageFunction={(e: React.ChangeEvent<HTMLInputElement>) =>
setContent(e.target.value)
}
value={content}
/>
<ButtonStore
buttonStyle={ButtonStyle.CONFIRM_BTN}
style="w-[40px] h-[30px]"
btnType="submit">
{btnText}
</ButtonStore>
</form>
<>
{check ? (
<>
<form className={style} onSubmit={handleSubmit}>
<InputStore
inputStyle={InputStyle.INPUT_WHITE}
inputType="text"
placeholderContents={place}
style={inputStyle}
onChageFunction={(e: React.ChangeEvent<HTMLInputElement>) =>
setContent(e.target.value)
}
value={content}
/>
<ButtonStore
buttonStyle={ButtonStyle.CONFIRM_BTN}
style="w-[40px] h-[30px]"
btnType="submit">
{btnText}
</ButtonStore>
</form>
</>
) : (
<p className="text-center font-semibold">로그인 후 작성 가능합니다!</p>
)}
</>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,21 @@ import Image from 'next/image'
export default function DetailProfile({ userData }: { userData: UserData }) {
return (
<div className="flex items-center font-NanumSquareRound mt-5">
{userData.image == null ? (
<Image
src={
'https://cdnimg.melon.co.kr/cm2/artistcrop/images/002/61/143/261143_20210325180240_500.jpg?61e575e8653e5920470a38d1482d7312/melon/optimize/90'
}
width={50}
height={50}
alt="profile"
className="rounded-full"
/>
<div className="flex-col ml-3 pb-1">
<p className="text-lg">홍길동</p>
<p className="text-xs text-gray-400">@user1</p>
</div>
{/* 백엔드 해결되면 위에 코드 지우고 아래 살리면 됨 */}
{/* {userData.image == null ? (
<IconStore
iconStyle={IconStyle.MY_PROFILE_FILL}
size={50}
Expand All @@ -21,19 +35,10 @@ export default function DetailProfile({ userData }: { userData: UserData }) {
className="rounded-full"
/>
)}
{/* <Image
src={
'https://cdnimg.melon.co.kr/cm2/artistcrop/images/002/61/143/261143_20210325180240_500.jpg?61e575e8653e5920470a38d1482d7312/melon/optimize/90'
}
width={50}
height={50}
alt="profile"
className="rounded-full"
/> */}
<div className="flex-col ml-3 pb-1">
<p className="text-lg">{userData.nickname}</p>
<p className="text-xs text-gray-400">@{userData.email.split('@')[0]}</p>
</div>
</div> */}
</div>
)
}

0 comments on commit de25388

Please sign in to comment.