-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from SpaceyaTech/update-team
Update team
- Loading branch information
Showing
16 changed files
with
712 additions
and
840 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,44 @@ | ||
import React from "react"; | ||
import { useParams } from "react-router-dom"; | ||
import BlogWrapper from "./sections/BlogWrapper"; | ||
import useBlogData from "../../../hooks/Queries/blog/useBlogData"; | ||
|
||
function Blog() { | ||
const { id } = useParams(); | ||
const { data: blogData, isLoading, isError, isSuccess } = useBlogData(id); | ||
|
||
return ( | ||
<> | ||
{isError && <p>Error fetching blog details!</p>} | ||
{isLoading && <p>Loading blog details...</p>} | ||
{isSuccess && ( | ||
<section className="flex flex-col p-4 md:p-8 lg:p-10"> | ||
<img | ||
src={blogData.image} | ||
alt="blog" | ||
className="w-full h-60 md:h-72 object-cover rounded-lg mb-4 md:mb-8" | ||
/> | ||
|
||
{/* <div className="flex flex-row items-center justify-between"> | ||
<p className="text-[#4C4D4D] text-sm md:text-base font-bold"> | ||
{new Date(blogData.created_at).toLocaleDateString("en-US", { | ||
year: "numeric", | ||
month: "short", | ||
day: "numeric", | ||
})} | ||
</p> | ||
<BlogStats likes={blogData.likes} /> | ||
</div> */} | ||
|
||
<BlogWrapper blog={blogData} /> | ||
|
||
{/* <RelatedBlogs /> */} | ||
</section> | ||
)} | ||
</> | ||
); | ||
} | ||
|
||
export default Blog; | ||
import React from "react"; | ||
import { useParams } from "react-router-dom"; | ||
import BlogStats from "../blogs/sections/BlogStats"; | ||
import BlogWrapper from "./sections/BlogWrapper"; | ||
import useBlogData from "../../../hooks/Queries/blog/useBlogData"; | ||
|
||
function Blog() { | ||
const { id } = useParams(); | ||
const { data: blogData, isLoading, isError, isSuccess } = useBlogData(id); | ||
|
||
return ( | ||
<> | ||
{isError && <p>Error fetching blog details!</p>} | ||
{isLoading && <p>Loading blog details...</p>} | ||
{isSuccess && ( | ||
<section className="flex flex-col p-4 md:p-8 lg:p-10"> | ||
<img | ||
src={blogData.image} | ||
alt="blog" | ||
className="w-full h-60 md:h-72 object-cover rounded-lg mb-4 md:mb-8" | ||
/> | ||
|
||
<div className="flex flex-row items-center justify-between"> | ||
<p className="text-[#4C4D4D] text-sm md:text-base font-bold"> | ||
{new Date(blogData.created_at).toLocaleDateString("en-US", { | ||
year: "numeric", | ||
month: "short", | ||
day: "numeric", | ||
})} | ||
</p> | ||
|
||
<BlogStats likes={blogData.likes} /> | ||
</div> | ||
|
||
<BlogWrapper blog={blogData} /> | ||
|
||
{/* <RelatedBlogs /> */} | ||
</section> | ||
)} | ||
</> | ||
); | ||
} | ||
|
||
export default Blog; |
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 was deleted.
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
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.