Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2931256

Browse files
committed
fix: format
1 parent 1976720 commit 2931256

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,12 @@ export const MultiSelectCombobox = forwardRef<
205205
const [isLoading, setIsLoading] = useState(false);
206206
const dropdownRef = useRef<HTMLDivElement>(null);
207207

208-
const [selected, setSelected] = useState<Option[]>(
209-
() => {
210-
if (arrayDefaultOptions && arrayDefaultOptions.length > 0) {
211-
return arrayDefaultOptions;
212-
}
213-
return [];
208+
const [selected, setSelected] = useState<Option[]>(() => {
209+
if (arrayDefaultOptions && arrayDefaultOptions.length > 0) {
210+
return arrayDefaultOptions;
214211
}
215-
);
212+
return [];
213+
});
216214
const [options, setOptions] = useState<GroupOption>(
217215
transitionToGroupOption(arrayDefaultOptions, groupBy),
218216
);

site/src/pages/CreateWorkspacePage/CreateWorkspacePageViewExperimental.tsx

+8-6
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ export const CreateWorkspacePageViewExperimental: FC<
209209
parameters,
210210
]);
211211

212-
const [debouncedTimer, setDebouncedTimer] = useState<ReturnType<typeof setTimeout> | null>(
213-
null,
214-
);
212+
const [debouncedTimer, setDebouncedTimer] = useState<ReturnType<
213+
typeof setTimeout
214+
> | null>(null);
215215

216216
const handleChange = async (
217217
value: string,
@@ -226,9 +226,11 @@ export const CreateWorkspacePageViewExperimental: FC<
226226

227227
// Create the request object
228228
const createRequest = () => {
229-
const newInputs = Object.fromEntries(form.values.rich_parameter_values?.map(value => {
230-
return [value.name, value.value]
231-
}) ?? []);
229+
const newInputs = Object.fromEntries(
230+
form.values.rich_parameter_values?.map((value) => {
231+
return [value.name, value.value];
232+
}) ?? [],
233+
);
232234
// Update the input for the changed parameter
233235
newInputs[parameter.name] = value;
234236

0 commit comments

Comments
 (0)