-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add rich text editor, separate blog page.
- Loading branch information
1 parent
c333b56
commit e36d444
Showing
15 changed files
with
713 additions
and
55 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from "react"; | ||
import { getBlogById } from "@/app/actions/BlogData"; | ||
import parse from "html-react-parser"; | ||
|
||
const page = async ({ params }) => { | ||
const blogid = params.blogid; | ||
const blogDetails = await getBlogById(blogid); | ||
return <div className="min-h-[70vh] flex flex-col gap-8 items-center py-8"> | ||
<h1 className="w-full text-center text-3xl">{blogDetails.title}</h1> | ||
<p className="w-4/5 text-xl max-w-[750px]">{parse(blogDetails.content)}</p> | ||
<div className="flex items-center w-4/5 max-w-[750px] justify-between text-sm"> | ||
<span className="bg-gray-300 p-1 sm:p-2 rounded-sm">Author: {blogDetails.author}</span> | ||
<span className="bg-gray-300 p-1 sm:p-2 rounded-sm">Club: {blogDetails.club}</span> | ||
</div> | ||
</div>; | ||
}; | ||
|
||
export default page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.