refactor: variable namings

This commit is contained in:
Anderson Oki 2024-04-10 14:56:57 +09:00
parent 0cbcf41ef5
commit 3c2fd291d6
2 changed files with 5 additions and 5 deletions

View File

@ -198,7 +198,7 @@ const ProviderTool: FunctionComponent<ProviderToolProps> = ({
}
}, []);
const fooOptions = useMemo(
const options = useMemo(
() =>
availableOptions.filter(
(v) =>
@ -208,8 +208,8 @@ const ProviderTool: FunctionComponent<ProviderToolProps> = ({
[info?.key, enabledProviders, availableOptions],
);
const options = useSelectorOptions(
fooOptions,
const selectorOptions = useSelectorOptions(
options,
(v) => v.name ?? capitalize(v.key),
);
@ -299,7 +299,7 @@ const ProviderTool: FunctionComponent<ProviderToolProps> = ({
placeholder="Click to Select a Provider"
itemComponent={SelectItem}
disabled={payload !== null}
{...options}
{...selectorOptions}
value={info}
onChange={onSelect}
></Selector>

View File

@ -11,7 +11,7 @@ import {
Text,
} from "../components";
import { ProviderView } from "./components";
import {IntegrationList, ProviderList} from "@/pages/Settings/Providers/list";
import { IntegrationList, ProviderList } from "./list";
const SettingsProvidersView: FunctionComponent = () => {
return (