Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leafty committed Feb 24, 2025
1 parent dab89e8 commit 737a305
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ import { Label } from "reactstrap";
import { BUILDER_FRONTENDS } from "../../session.constants";
import BuilderSelectorCommon from "./BuilderSelectorCommon";

/* eslint-disable spellcheck/spell-checker */
// const BUILDER_FRONTENDS = ["vscodium"] as const;
/* eslint-enable spellcheck/spell-checker */

interface BuilderFrontendSelectorProps<T extends FieldValues>
extends UseControllerProps<T> {}

Expand Down Expand Up @@ -64,13 +60,15 @@ export default function BuilderFrontendSelector<T extends FieldValues>({
data-cy="environment-type-select"
>
<BuilderSelectorCommon
name={controllerProps.name}
defaultValue={defaultValue}
options={BUILDER_FRONTENDS}
disabled={disabled}
id="builder-environment-frontend-select"
inputId="builder-environment-frontend-select-input"
name={controllerProps.name}
onBlur={onBlur}
onChange={onChange}
options={BUILDER_FRONTENDS}
value={value ?? ""}
disabled={disabled}
/>
</div>
<div className="invalid-feedback">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import styles from "./Select.module.scss";
interface BuilderSelectorCommonProps {
defaultValue?: BuilderSelectorOption | undefined;
disabled?: boolean;
id: string;
inputId: string;
name: string;
options: readonly BuilderSelectorOption[];
value: string;
Expand All @@ -45,6 +47,8 @@ interface BuilderSelectorCommonProps {
export default function BuilderSelectorCommon({
defaultValue,
disabled,
id,
inputId,
name,
options,
value: value_,
Expand Down Expand Up @@ -72,8 +76,10 @@ export default function BuilderSelectorCommon({

return (
<Select
id="builder-environment-type-select"
inputId="builder-environment-type-select-input"
// id="builder-environment-type-select"
// inputId="builder-environment-type-select-input"
id={id}
inputId={inputId}
name={name}
isClearable={false}
isSearchable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import cx from "classnames";
import { useMemo } from "react";
import { BoxArrowUpRight } from "react-bootstrap-icons";
import {
Controller,
type FieldValues,
Expand All @@ -26,10 +27,9 @@ import {
type UseControllerProps,
} from "react-hook-form";
import { Label } from "reactstrap";
import { ExternalLink } from "../../../../components/ExternalLinks";
import { BUILDER_TYPES } from "../../session.constants";
import BuilderSelectorCommon from "./BuilderSelectorCommon";
import { ExternalLink } from "../../../../components/ExternalLinks";
import { BoxArrowUpRight } from "react-bootstrap-icons";

interface BuilderTypeSelectorProps<T extends FieldValues>
extends UseControllerProps<T> {}
Expand Down Expand Up @@ -69,13 +69,15 @@ export default function BuilderTypeSelector<T extends FieldValues>({
data-cy="environment-type-select"
>
<BuilderSelectorCommon
name={controllerProps.name}
defaultValue={defaultValue}
options={BUILDER_TYPES}
disabled={disabled}
id="builder-environment-type-select"
inputId="builder-environment-type-select-input"
name={controllerProps.name}
onBlur={onBlur}
onChange={onChange}
options={BUILDER_TYPES}
value={value ?? ""}
disabled={disabled}
/>
</div>
<div className="invalid-feedback">
Expand Down

0 comments on commit 737a305

Please sign in to comment.