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

@ -19,8 +19,10 @@ export const ListComponent = React.memo((props: ListComponentProps) => {
const { name, parent_path, value, docString } = props;
return (
<div className={'component boolean'} id={parent_path.concat(name)}>
<p>Render count: {renderCount.current}</p>
<div className={'component list'} id={parent_path.concat(name)}>
{process.env.NODE_ENV === 'development' && (
<p>Render count: {renderCount.current}</p>
)}
<DocStringComponent docString={docString} />
{value.map((item, index) => {
return (