-
Notifications
You must be signed in to change notification settings - Fork 3
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 #8 from rohit-zip/main
feature/blog-drawer
- Loading branch information
Showing
7 changed files
with
83 additions
and
77 deletions.
There are no files selected for viewing
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,46 @@ | ||
import React from 'react'; | ||
import {Card, CardContent, CardFooter, CardHeader} from "@/components/ui/card"; | ||
import {Avatar, Button} from "@nextui-org/react"; | ||
import {useSelector} from "react-redux"; | ||
import {RootState} from "@/state/store"; | ||
|
||
const BlogCommentField = () => { | ||
|
||
const {isAuthenticated} = useSelector((state: RootState) => state.auth); | ||
const {name, profileImage} = useSelector((state: RootState) => state.profile); | ||
|
||
return ( | ||
<div className={"flex flex-col my-6"}> | ||
{isAuthenticated && ( | ||
<Card> | ||
<CardHeader className={"p-3"}> | ||
<div className={"flex items-center gap-2"}> | ||
<Avatar | ||
src={profileImage ? profileImage : ""} | ||
showFallback={true} | ||
size={"md"} | ||
/> | ||
<span>{name}</span> | ||
</div> | ||
</CardHeader> | ||
|
||
<CardContent> | ||
<textarea | ||
className={"border-none outline-none bg-transparent w-full resize-none"} | ||
rows={4} | ||
placeholder={"Any thoughts ?"} | ||
/> | ||
</CardContent> | ||
|
||
<CardFooter className={"flex justify-end py-3"}> | ||
<Button color={"primary"} size={"sm"}> | ||
Send | ||
</Button> | ||
</CardFooter> | ||
</Card> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default BlogCommentField; |
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