Skip to content
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

GDSC SKHU Web - 이찬균 #2

Merged
merged 7 commits into from Nov 23, 2022
Merged

GDSC SKHU Web - 이찬균 #2

merged 7 commits into from Nov 23, 2022

Conversation

lgyn10
Copy link
Contributor

@lgyn10 lgyn10 commented Nov 22, 2022

Description

  • 게시물 댓글 기능 구현
  • 좋아요 클릭 시 좋아요 수 카운트 기능 구현
  • 프로필 클릭 시 인스타그램 링크 구현

Important content

Question

  • 댓글창 css 구현 시 댓글의 border-bottom에만 solid 1px을 적용하고 싶었는데, 0번째 댓글(..? 초기값..?)의 border-bottom 때문에 좀 더 미관상 좋지가 못한데, &:nth-child()로 해결 가능할 줄 알았으나 적용이 쉽지 않아 해결 방안이 궁금합니다!

Reference

https://getcssscan.com/css-buttons-examples
https://getcssscan.com/css-box-shadow-examples
https://www.youtube.com/watch?v=f9fqiNM30ik&t=845s&ab_channel=ModernWeb
web4hw

@lgyn10 lgyn10 marked this pull request as draft November 22, 2022 17:57
@lgyn10 lgyn10 marked this pull request as ready for review November 22, 2022 17:59
@lgyn10 lgyn10 marked this pull request as draft November 22, 2022 18:00
@lgyn10 lgyn10 marked this pull request as ready for review November 22, 2022 18:00
return (
<>
<Hdiv>
<Image src="/gyuns.png" alt="some" width={225} height={60} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 로고를 직접 그리고 삽입하신 건가요?!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵! 좀 그럴싸해보이지 않나요?? 😎

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오오 명필입니다

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아아 직접 그린건 아니고, 텍스트를 이미지화하는 사이트에서 만들어서 가져온겁니다!😂

Comment on lines +46 to +48
<StyledLike onClick={() => setCount(count + 1)}>
{count} Like
</StyledLike>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋아요는 생각도 못 했는데 잘 활용하신 것 같아요!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

count도 배웠는데, 복습할 겸 써봤어용!

padding: 10px 12px;
text-align: center;
transition: all 200ms;
vertical-align: baseline;
Copy link
Contributor

@Lee2Eunji Lee2Eunji Nov 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vertical-align은 안 써봐서 거의 모르는 태그였는데 덕분에 알아갑니다😊

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 이번에 참조하면서 vertical-align에 대해서 공부했습니다! 상당히 깊은 내용이 있더군요

Copy link
Member

@hanseulhee hanseulhee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

댓글창 css 구현 시 댓글의 border-bottom에만 solid 1px을 적용하고 싶었는데, 0번째 댓글(..? 초기값..?)의 border-bottom 때문에 좀 더 미관상 좋지가 못한데, &:nth-child()로 해결 가능할 줄 알았으나 적용이 쉽지 않아 해결 방안이 궁금합니다!

말씀하시는 게 제가 이해한 게 맞다면<StyledLine />때문에 그런 게 아닐까 싶어요 ~! 이걸 말씀하신 게 아니라면 다시 말씀해주세요 😄

좋아요 클릭 시 좋아요 수 카운트 기능 구현

정말 수고하셨어요 👍🏻👍🏻👍🏻

Comment on lines +46 to +47
<StyledLike onClick={() => setCount(count + 1)}>
{count} Like
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WOW !!! 좋아요도 해보시다니 👍🏻👍🏻👍🏻

Comment on lines +16 to +17

const [comment, setComment] = useState<Icomment[]>([{ id: 0, content: "" }]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments, setComments 라는 명칭이 더 어울릴 것 같아요 ~~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵!! 좀 더 변수명을 명확히 하겠습니다!!

Comment on lines +59 to +60
<StyledInput
type="text"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input의 type은 기본이 text라 생략해도 된다는 점 아시면 좋을 것 같아요!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵!!

Comment on lines +35 to +41

const StyledSection = styled.section``;
const StyledH1 = styled.h1`
color: #2c1e11;
font-weight: bold;
`;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 안쓰이고 있는 것 같은데 지워도 될 것 같아요 ~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그러네요.. 쓰려다가 안 쓰게 되었는데, 이것저것 너무 많아서 지우는 것 잊었네요..

Copy link
Member

@hyesungoh hyesungoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 👍 👍

말씀하신 속성은 아래 링크를 보시면 좋을 거 같아요 ~
https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-of-type

return (
<>
<Hdiv>
<Image src="/gyuns.png" alt="some" width={225} height={60} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오오 명필입니다

</StyledStatusCard>
<StyledComment>
<span>comment...</span>
<StyledLike onClick={() => setCount(count + 1)}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<StyledLike onClick={() => setCount(count + 1)}>
<StyledLike onClick={() => setCount(prev => prev + 1)}>

이렇게 비동기로 업데이트되는 걸 보장해 주면 좋을 거 같아요 ~

@hanseulhee hanseulhee merged commit c1e8057 into GDSC-SKHU:main Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants