diff --git a/web/src/components/PartProfile/PartProfile.js b/web/src/components/PartProfile/PartProfile.js index ad2dd3b..03397a0 100644 --- a/web/src/components/PartProfile/PartProfile.js +++ b/web/src/components/PartProfile/PartProfile.js @@ -88,9 +88,11 @@ const PartProfile = ({ className="mt-6 ml-auto hover:shadow-lg bg-gradient-to-r from-transparent to-indigo-100" shouldAnimateHover iconName="chevron-down" - onClick={() => {}} + onClick={() => { + document.getElementById('comment-section').scrollIntoView() + }} > - Comments 11 + {userPart.Part.Comment.length} Comments
-

+

Comments

diff --git a/web/src/index.css b/web/src/index.css index f6b9d9c..4c05cef 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -48,7 +48,9 @@ /* stop pop over from scrolling */ overflow: visible !important; } - +html { + scroll-behavior: smooth; +} body { /* TODO can I use a tailwind class here? */ background-color: #f7fafc;