cleanup: changing some frontend components

This commit is contained in:
Mose Müller
2024-02-28 10:59:28 +01:00
parent 9c6323d38f
commit 6ed6fe5be1
3 changed files with 10 additions and 20 deletions

View File

@@ -39,15 +39,6 @@ export const MethodComponent = React.memo((props: MethodProps) => {
triggerNotification();
};
const formContent = (
<Form onSubmit={execute} ref={formRef}>
<Button className="component" variant="primary" type="submit">
{`${displayName} `}
<DocStringComponent docString={docString} />
</Button>
</Form>
);
useEffect(() => {
renderCount.current++;
});
@@ -57,7 +48,12 @@ export const MethodComponent = React.memo((props: MethodProps) => {
{process.env.NODE_ENV === 'development' && (
<div>Render count: {renderCount.current}</div>
)}
<div>{formContent}</div>
<Form onSubmit={execute} ref={formRef}>
<Button className="component" variant="primary" type="submit">
{`${displayName} `}
<DocStringComponent docString={docString} />
</Button>
</Form>
</div>
);
});