-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Removed the Unecessary rerendering using memo react.
- Loading branch information
1 parent
69837c5
commit e77f080
Showing
3 changed files
with
87 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import PropTypes from "prop-types"; | ||
import { RiRobot2Line } from "react-icons/ri"; | ||
|
||
export const QuestionMessage = ({ children }) => { | ||
return ( | ||
<div className="flex flex-row items-center gap-2 h-full"> | ||
<RiRobot2Line size={18} className="text-blue-800" /> | ||
<div className="w-[70%] animate__animated animate__faster animate__fadeIn"> | ||
{children} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
QuestionMessage.propTypes = { | ||
children: PropTypes.node, | ||
}; |
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,17 @@ | ||
import { RiRobot2Line } from "react-icons/ri"; | ||
import PropTypes from "prop-types"; | ||
|
||
export const SimpleMessage = ({ children }) => { | ||
return ( | ||
<div className="flex flex-row items-center gap-2 h-full"> | ||
<RiRobot2Line size={18} className="text-blue-800" /> | ||
<span className="bg-gray-200 p-2 w-[70%] animate__animated animate__faster animate__fadeIn rounded-lg font-lora"> | ||
{children} | ||
</span> | ||
</div> | ||
); | ||
}; | ||
|
||
SimpleMessage.propTypes = { | ||
children: PropTypes.any, | ||
}; |