From cb701badb6fb4329c3ac00032a1242e0891a4224 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Wed, 23 Feb 2022 02:46:09 -0500 Subject: [PATCH] cleanup --- .../tts_configs/TtsConfigsEditRulePage.tsx | 49 ++----------------- 1 file changed, 4 insertions(+), 45 deletions(-) diff --git a/packages/storyteller/src/pages/tts_configs/TtsConfigsEditRulePage.tsx b/packages/storyteller/src/pages/tts_configs/TtsConfigsEditRulePage.tsx index a396c3cee9..a597934792 100644 --- a/packages/storyteller/src/pages/tts_configs/TtsConfigsEditRulePage.tsx +++ b/packages/storyteller/src/pages/tts_configs/TtsConfigsEditRulePage.tsx @@ -121,8 +121,6 @@ function TtsConfigsEditRulePage(props: Props) { /> - - @@ -150,16 +148,15 @@ function ExactCheersForm(props: ExactCheersFormProps) { const updateCheerPrefix = (ev: React.FormEvent) : boolean => { const value = (ev.target as HTMLSelectElement).value; setCheerPrefix(value); - calcuateFieldValue(value, bitsValue); + recalcuateFieldValue(value, bitsValue); return true; } const updateBitsValue = (ev: React.FormEvent) : boolean => { const value = (ev.target as HTMLSelectElement).value; const numericValue = parseInt(value); - console.log(value, numericValue); setBitsValue(numericValue); - calcuateFieldValue(cheerPrefix, numericValue); + recalcuateFieldValue(cheerPrefix, numericValue); return true; } @@ -169,52 +166,17 @@ function ExactCheersForm(props: ExactCheersFormProps) { return true; } - const calcuateFieldValue = (prefix: string|undefined, bits: number) => { + // When the dropdowns are used, replace any manual text entry. + const recalcuateFieldValue = (prefix: string|undefined, bits: number) => { if (prefix === undefined) { return; } - //if (!cheerPrefix || !bitsValue || !!manualCheerValue) { - // return; - //} const cheerValue = `${prefix}${bits}`; setManualCheerValue(cheerValue); } - - let secondSelect = <>; - - if (!!cheerPrefix) { - secondSelect = ( - <> -
-
- -
-
- -
-
-
-
- - ); - } - return ( <> -
-
- -

@@ -236,7 +198,6 @@ function ExactCheersForm(props: ExactCheersFormProps) {

-

@@ -253,7 +214,6 @@ function ExactCheersForm(props: ExactCheersFormProps) {

-

@@ -269,7 +229,6 @@ function ExactCheersForm(props: ExactCheersFormProps) {

- ) }