From 1f02ab5c692801709221d4e27f3001a40cb4e8ae Mon Sep 17 00:00:00 2001
From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
Date: Sun, 17 Jan 2021 02:41:24 +0300
Subject: Updates Switch Statement Indent

Changes the switch statement indentation level to 1 in the eslint
config, and updates files accordingly.

Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
---
 src/components/Question.tsx | 64 ++++++++++++++++++++++-----------------------
 1 file changed, 32 insertions(+), 32 deletions(-)

(limited to 'src/components/Question.tsx')

diff --git a/src/components/Question.tsx b/src/components/Question.tsx
index e1472e4..34d12f7 100644
--- a/src/components/Question.tsx
+++ b/src/components/Question.tsx
@@ -46,24 +46,24 @@ class RenderedQuestion extends React.Component<QuestionProp> {
         let value: string | boolean;
 
         switch (event.target.type) {
-        case "checkbox":
-            target = event.target.name;
-            value = event.target.checked;
-            break;
-
-        case "radio":
-            // This handles radios and ranges, as they are both based on the same fundamental input type
-            target = "value";
-            if (event.target.parentElement) {
-                value = event.target.parentElement.innerText.trimEnd();
-            } else {
-                value = event.target.value;
-            }
-            break;
+            case "checkbox":
+                target = event.target.name;
+                value = event.target.checked;
+                break;
+
+            case "radio":
+                // This handles radios and ranges, as they are both based on the same fundamental input type
+                target = "value";
+                if (event.target.parentElement) {
+                    value = event.target.parentElement.innerText.trimEnd();
+                } else {
+                    value = event.target.value;
+                }
+                break;
 
-        default:
-            target = "value";
-            value = event.target.value;
+            default:
+                target = "value";
+                value = event.target.value;
         }
 
         this._setState(target, value);
@@ -85,21 +85,21 @@ class RenderedQuestion extends React.Component<QuestionProp> {
 
         if (this.props.public_state.size === 0) {
             switch (this.props.question.type) {
-            case QuestionType.Checkbox:
-                if (typeof options === "string") {
-                    return;
-                }
-
-                options.forEach((option, index) => {
-                    this._setState(`${("000" + index).slice(-4)}. ${option}`, false);
-                });
-                break;
-
-            case QuestionType.Range:
-            case QuestionType.Radio:
-            case QuestionType.Select:
-                this._setState("value", null);
-                break;
+                case QuestionType.Checkbox:
+                    if (typeof options === "string") {
+                        return;
+                    }
+
+                    options.forEach((option, index) => {
+                        this._setState(`${("000" + index).slice(-4)}. ${option}`, false);
+                    });
+                    break;
+
+                case QuestionType.Range:
+                case QuestionType.Radio:
+                case QuestionType.Select:
+                    this._setState("value", null);
+                    break;
             }
         }
     }
-- 
cgit v1.2.3

