Skip to content

Commit c2d4014

Browse files
committed
refactor: streamline description rendering in ModuleAnalyticsSidebar
Removed redundant wrapping of the description TextArea in the ModuleAnalyticsSidebar component, simplifying the code while maintaining functionality. This change enhances readability and consistency in the component's structure.
1 parent 55e0483 commit c2d4014

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • apps/web/core/components/modules/analytics-sidebar

apps/web/core/components/modules/analytics-sidebar/root.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,11 @@ export const ModuleAnalyticsSidebar = observer(function ModuleAnalyticsSidebar(p
235235
/>
236236
</div>
237237
<h4 className="w-full text-18 font-semibold wrap-break-word text-primary">{moduleDetails.name}</h4>
238+
{moduleDetails.description && (
239+
<TextArea size="lg" surface="inline" autoResize value={moduleDetails.description} disabled />
240+
)}
238241
</div>
239242

240-
{moduleDetails.description && (
241-
<TextArea size="lg" surface="inline" autoResize value={moduleDetails.description} disabled />
242-
)}
243-
244243
<div className="flex flex-col gap-5 pt-2.5 pb-6">
245244
<div className="flex items-center justify-start gap-1">
246245
<div className="flex w-2/5 items-center justify-start gap-2 text-tertiary">

0 commit comments

Comments
 (0)