From f2562110322a42287b38ecdedbeaec6a96855cd6 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 10 Jul 2023 16:46:43 +0300 Subject: [PATCH] feat(client): make checkmark a React component for the block (#50928) --- .../Introduction/components/block.tsx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/client/src/templates/Introduction/components/block.tsx b/client/src/templates/Introduction/components/block.tsx index 1a64364850b..aadd06f1706 100644 --- a/client/src/templates/Introduction/components/block.tsx +++ b/client/src/templates/Introduction/components/block.tsx @@ -71,6 +71,14 @@ export const BlockIntros = ({ intros }: { intros: string[] }): JSX.Element => { ); }; +function CheckMark({ isCompleted }: { isCompleted: boolean }): JSX.Element { + return isCompleted ? ( + + ) : ( + + ); +} + class Block extends Component { static displayName: string; constructor(props: BlockProps) { @@ -85,14 +93,6 @@ class Block extends Component { toggleBlock(blockDashedName); } - renderCheckMark(isCompleted: boolean): JSX.Element { - return isCompleted ? ( - - ) : ( - - ); - } - render(): JSX.Element { const { blockDashedName, @@ -185,7 +185,7 @@ class Block extends Component { {blockTitle}
- {this.renderCheckMark(isBlockCompleted)} +