frontend: only display "render count" when in development mode

This commit is contained in:
Mose Müller
2023-08-02 12:06:21 +02:00
parent 0af8fff9b5
commit 3e925c7087
8 changed files with 25 additions and 9 deletions

View File

@ -64,7 +64,9 @@ export const MethodComponent = React.memo((props: MethodProps) => {
<div
className="col-5 align-items-center method"
id={parent_path.concat('.' + name)}>
<p>Render count: {renderCount.current}</p>
{process.env.NODE_ENV === 'development' && (
<p>Render count: {renderCount.current}</p>
)}
<h5 onClick={() => setHideOutput(!hideOutput)} style={{ cursor: 'pointer' }}>
Function: {name}
<DocStringComponent docString={docString} />