diff --git a/package.json b/package.json index 2727808e..cdc96527 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ }, "devDependencies": { "@playwright/test": "^1.44.1", + "@tailwindcss/typography": "^0.5.13", "@types/node": "^20.14.1", "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", diff --git a/src/pages/blog/sections/BlogBody.jsx b/src/pages/blog/sections/BlogBody.jsx index 9ffba5aa..09af54dd 100644 --- a/src/pages/blog/sections/BlogBody.jsx +++ b/src/pages/blog/sections/BlogBody.jsx @@ -7,14 +7,12 @@ import { glovo } from "../../../assets/images/blogs-page"; import NextRead from "./NextRead"; import RelatedBlogs from "./RelatedBlogs"; -import "./blogBody.css"; - function BlogBody({ id, categoryId, blogBody }) { const BodyRef = useRef(null); useEffect(() => { if (BodyRef.current) { - BodyRef.current.innerHTML += blogBody ?? ""; + BodyRef.current.innerHTML = blogBody ?? ""; } }, [blogBody]); @@ -22,8 +20,10 @@ function BlogBody({ id, categoryId, blogBody }) {
-
- +
{/* */}
{/* read next */} diff --git a/tailwind.config.js b/tailwind.config.js index aa7e47ef..c0a98b06 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -74,5 +74,9 @@ module.exports = { }, }, // eslint-disable-next-line global-require, import/no-extraneous-dependencies - plugins: [require("tailwind-scrollbar-hide"), require("tailwindcss-animate")], + plugins: [ + require("tailwind-scrollbar-hide"), + require("tailwindcss-animate"), + require("@tailwindcss/typography"), + ], };