Skip to content

Commit d260f48

Browse files
committed
little cleanup
1 parent 61f57d0 commit d260f48

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

  • src/management-system-v2/components/html-form-editor/elements

src/management-system-v2/components/html-form-editor/elements/Input.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,7 @@ export const InputSettings = () => {
219219
const [modalOpen, setModalOpen] = useState(false);
220220

221221
// Determine display text for the button
222-
const getDisplayText = () => {
223-
if (variable) {
224-
return variable;
225-
}
226-
return 'Select Variable';
227-
};
228-
229-
const displayText = getDisplayText();
222+
const displayText = variable || 'Select Variable';
230223
const hasVariable = !!variable;
231224

232225
return (
@@ -290,7 +283,7 @@ export const InputSettings = () => {
290283
setProp((props: InputProps) => {
291284
props.variable = selected;
292285
if (variableTextFormat) {
293-
props.type = variableTextFormat as InputProps['type'];
286+
props.type = variableTextFormat;
294287
} else {
295288
switch (variableType) {
296289
case 'string':

0 commit comments

Comments
 (0)