📝 Purified Card Component

This commit is contained in:
2023-09-24 00:50:36 -04:00
parent 69cebe82dd
commit 538ca61fa8
2 changed files with 8 additions and 6 deletions

View File

@@ -290,7 +290,9 @@ export const ComicDetail = (data: ComicDetailProps): ReactElement => {
<ComicViewer <ComicViewer
pages={extractedComicBook} pages={extractedComicBook}
direction="ltr" direction="ltr"
className={{closeButton: "border: 1px solid red;"}} className={{
closeButton: "border: 1px solid red;",
}}
/> />
)} )}
</Modal> </Modal>
@@ -317,4 +319,4 @@ export const ComicDetail = (data: ComicDetailProps): ReactElement => {
); );
}; };
export default ComicDetail; export default ComicDetail;

View File

@@ -15,7 +15,7 @@ interface ICardProps {
imageStyle?: PropTypes.object; imageStyle?: PropTypes.object;
} }
const renderCard = (props): ReactElement => { const renderCard = (props: ICardProps): ReactElement => {
switch (props.orientation) { switch (props.orientation) {
case "horizontal": case "horizontal":
return ( return (
@@ -85,8 +85,8 @@ const renderCard = (props): ReactElement => {
} }
}; };
export const Card = (props: ICardProps): ReactElement => { export const Card = React.memo(
return renderCard(props); (props: ICardProps): ReactElement => renderCard(props),
}; );
export default Card; export default Card;