diff --git a/package.json b/package.json index 9fee75e..6bbba9b 100644 --- a/package.json +++ b/package.json @@ -15,18 +15,19 @@ "dependencies": { "gh-pages": "^6.0.0", "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "react-fast-marquee": "^1.6.4" }, "devDependencies": { "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@vitejs/plugin-react-swc": "^3.3.2", "eslint": "^8.45.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.1.3", "husky": "^9.0.11", "lint-staged": "^15.2.2", "prettier": "^3.2.5", diff --git a/src/components/Reusables/AlumniItem/AlumniItem.module.css b/src/components/Reusables/AlumniItem/AlumniItem.module.css index 692bf4f..af0f0df 100644 --- a/src/components/Reusables/AlumniItem/AlumniItem.module.css +++ b/src/components/Reusables/AlumniItem/AlumniItem.module.css @@ -3,6 +3,7 @@ justify-content: center; align-items: center; overflow-y: hidden; + padding-right: 5rem; } .alumni_item__detail { diff --git a/src/components/Reusables/Carousel/Carousel.jsx b/src/components/Reusables/Carousel/Carousel.jsx index 987727b..fdceac6 100644 --- a/src/components/Reusables/Carousel/Carousel.jsx +++ b/src/components/Reusables/Carousel/Carousel.jsx @@ -1,4 +1,5 @@ /* eslint-disable react/prop-types */ +import Marquee from "react-fast-marquee" import styles from "./Carousel.module.css" /** @@ -10,50 +11,13 @@ import styles from "./Carousel.module.css" * @returns {JSX.Element} - The rendered carousel item component. */ const Carousel = ({ id, props }) => { - const handleClickScrollLeft = (e) => { - const carousel = document.getElementById(e) - if (carousel) { - carousel.scrollBy({ - left: -carousel.offsetWidth, - behavior: "smooth", - }) - } - } - - const handleClickScrollRight = (e) => { - const carousel = document.getElementById(e) - if (carousel) { - carousel.scrollBy({ - left: carousel.offsetWidth, - behavior: "smooth", - }) - } - } return (