From dfe2b1420644e2ef7a639bc1232b146c694443bf Mon Sep 17 00:00:00 2001 From: Chneemann Date: Fri, 11 Apr 2025 10:36:53 +0200 Subject: [PATCH] refactor: refactor if statements to switch-case for better readability and performance --- .../shared/components/overlay/overlay.component.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/shared/components/overlay/overlay.component.html b/src/app/shared/components/overlay/overlay.component.html index bd7d389..9b7a21e 100644 --- a/src/app/shared/components/overlay/overlay.component.html +++ b/src/app/shared/components/overlay/overlay.component.html @@ -4,35 +4,35 @@ [class.closing]="isClosingAnimation" >
- @if (overlayType === "taskOverlay") { + @switch (overlayType) { @case ('taskOverlay') { - } @if (overlayType === "taskOverlayEdit") { + } @case ('taskOverlayEdit') { - } @if (overlayType === "newTaskOverlay") { + } @case ('newTaskOverlay') { - } @if (overlayType === "dialogOverlay") { + } @case ('dialogOverlay') { - } @if (overlayType === "contactOverlay") { + } @case ('contactOverlay') { - } + } @default { } }