diff --git a/web/package.json b/web/package.json index 7e6a2f3..062e332 100644 --- a/web/package.json +++ b/web/package.json @@ -31,6 +31,7 @@ "react": "^16.13.1", "react-dom": "^16.13.1", "react-dropzone": "^11.2.1", + "react-helmet": "^6.1.0", "react-image-crop": "^8.6.6", "rich-markdown-editor": "^11.0.2", "styled-components": "^5.2.0", 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/components/Seo/Seo.js b/web/src/components/Seo/Seo.js new file mode 100644 index 0000000..69d97f0 --- /dev/null +++ b/web/src/components/Seo/Seo.js @@ -0,0 +1,23 @@ +import { Helmet } from 'react-helmet' + +const Seo = ({ title, description, lang }) => { + return ( + <> + + + + + + Cadhub - {title} + + + ) +} + +export default Seo 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; diff --git a/web/src/index.html b/web/src/index.html index 47fb90f..f618a4e 100644 --- a/web/src/index.html +++ b/web/src/index.html @@ -3,8 +3,10 @@ - - CadHub + + + + <%= htmlWebpackPlugin.options.title %>