@@ -5,7 +5,6 @@ import { usePermissions } from '@/plugins/usePermissions';
55import InputSpinner from '@/components/elements/InputSpinner' ;
66import Input from '@/components/elements/Input' ;
77import Switch from '@/components/elements/Switch' ;
8- import tw from 'twin.macro' ;
98import { debounce } from 'debounce' ;
109import updateStartupVariable from '@/api/server/updateStartupVariable' ;
1110import useFlash from '@/plugins/useFlash' ;
@@ -61,15 +60,15 @@ const VariableBox = ({ variable }: Props) => {
6160 return (
6261 < TitledGreyBox
6362 title = {
64- < p css = { tw ` text-sm uppercase` } >
63+ < p className = " text-sm uppercase" >
6564 { ! variable . isEditable && (
66- < span css = { tw ` bg-neutral-700 text-xs py-1 px-2 rounded-full mr-2 mb-1` } > Read Only</ span >
65+ < span className = " bg-neutral-700 text-xs py-1 px-2 rounded-full mr-2 mb-1" > Read Only</ span >
6766 ) }
6867 { variable . name }
6968 </ p >
7069 }
7170 >
72- < FlashMessageRender byKey = { FLASH_KEY } css = { tw ` mb-2 md:mb-4` } />
71+ < FlashMessageRender byKey = { FLASH_KEY } className = " mb-2 md:mb-4" />
7372 < InputSpinner visible = { loading } >
7473 { useSwitch ? (
7574 < >
@@ -97,7 +96,7 @@ const VariableBox = ({ variable }: Props) => {
9796 < Select
9897 onChange = { ( e ) => setVariableValue ( e . target . value ) }
9998 name = { variable . envVariable }
100- defaultValue = { variable . serverValue }
99+ defaultValue = { variable . serverValue ?? variable . defaultValue }
101100 disabled = { ! canEdit || ! variable . isEditable }
102101 >
103102 { selectValues . map ( ( selectValue ) => (
@@ -120,15 +119,18 @@ const VariableBox = ({ variable }: Props) => {
120119 } }
121120 readOnly = { ! canEdit || ! variable . isEditable }
122121 name = { variable . envVariable }
123- defaultValue = { variable . serverValue }
122+ defaultValue = { variable . serverValue ?? '' }
124123 placeholder = { variable . defaultValue }
125124 />
126125 </ >
127126 ) }
128127 </ >
129128 ) }
130129 </ InputSpinner >
131- < p css = { tw `mt-1 text-xs text-neutral-300` } > { variable . description } </ p >
130+
131+ < p className = "mt-1 text-xs text-neutral-300" >
132+ { variable . description }
133+ </ p >
132134 </ TitledGreyBox >
133135 ) ;
134136} ;
0 commit comments