Skip to content

Commit

Permalink
fixed markdown error
Browse files Browse the repository at this point in the history
  • Loading branch information
ayush4345 committed Feb 27, 2024
1 parent 1695fa3 commit bbab3e7
Show file tree
Hide file tree
Showing 6 changed files with 191 additions and 10 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"react-paginate": "^8.2.0",
"react-query": "^3.39.3",
"react-responsive": "^9.0.2",
"remark-gfm": "^4.0.0",
"tailwind": "^4.0.0",
"tailwind-merge": "^2.2.1",
"tailwindcss": "^3.4.1",
Expand Down
183 changes: 183 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/components/blog/blogDetail.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"use client"

import { useEffect, useState } from "react";
import Navbar from "@/components/Navbar/Navbar";
import Footer from "@/components/footer";
import ReactMarkdown from "react-markdown";
import gfm from 'remark-gfm'
import './styleblog.css'
// Import Tailwind CSS classes
import 'tailwindcss/tailwind.css';
Expand Down Expand Up @@ -76,7 +75,7 @@ const BlogId = ({ params }) => {
</div>
</div>
</section>
<ReactMarkdown className="prose mx-auto w-4/5 md:max-w-full lg:max-w-screen-md 2xl:max-w-screen-lg text-black">{blogData.blog_body}</ReactMarkdown>
<ReactMarkdown remarkPlugins={[gfm]} className="prose mx-auto w-4/5 md:max-w-full lg:max-w-screen-md 2xl:max-w-screen-lg text-black">{blogData.blog_body}</ReactMarkdown>
</div>
) : (
<p>Loading...</p>
Expand Down
5 changes: 2 additions & 3 deletions src/components/event/eventDetail.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Import necessary modules
"use client"
import { useEffect, useState } from "react";
import Navbar from "@/components/Navbar/Navbar";
import Footer from "@/components/footer";
import gfm from 'remark-gfm'
import ReactMarkdown from "react-markdown";
import './styleblog.css'
// Import Tailwind CSS classes
Expand Down Expand Up @@ -73,7 +72,7 @@ const EventId = ({ params }) => {
</div>
</div>
</section>
<ReactMarkdown className="prose mx-auto w-4/5 md:max-w-full lg:max-w-screen-md 2xl:max-w-screen-lg text-black">{eventData.event_body}</ReactMarkdown>
<ReactMarkdown remarkPlugins={[gfm]} className="prose mx-auto w-4/5 md:max-w-full lg:max-w-screen-md 2xl:max-w-screen-lg text-black">{eventData.event_body}</ReactMarkdown>
</div>
) : (
<p>Loading...</p>
Expand Down
5 changes: 2 additions & 3 deletions src/components/project/projectDetail.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Import necessary modules
"use client"
import { useEffect, useState } from "react";
import Navbar from "@/components/Navbar/Navbar";
import Footer from "@/components/footer";
import gfm from 'remark-gfm'
import ReactMarkdown from "react-markdown";
import './styleblog.css'
// Import Tailwind CSS classes
Expand Down Expand Up @@ -67,7 +66,7 @@ const ProjectId = ({ params }) => {
</div>
</div>
</section>
<ReactMarkdown className="prose mx-auto w-4/5 md:max-w-full lg:max-w-screen-md 2xl:max-w-screen-lg text-black">{projectData.project_body}</ReactMarkdown>
<ReactMarkdown remarkPlugins={[gfm]} className="prose mx-auto w-4/5 md:max-w-full lg:max-w-screen-md 2xl:max-w-screen-lg text-black">{projectData.project_body}</ReactMarkdown>
</div>
) : (
<p>Loading...</p>
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ module.exports = {
},
},
},
plugins: [require("tailwindcss-animate")],
plugins: [require("tailwindcss-animate"), require('@tailwindcss/typography')],
}

0 comments on commit bbab3e7

Please sign in to comment.