Skip to content

Commit 8088ee7

Browse files
committed
replace select fields with styled components
1 parent 79f33e9 commit 8088ee7

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/components/settings/ImageModerationSettings.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React, { useEffect, useState } from 'react';
2-
import { Form, Switch, Select, Tooltip } from 'antd';
2+
import { Form, Switch, Tooltip } from 'antd';
33
import { QuestionCircleOutlined } from '@ant-design/icons';
44
import useGenericSettings from '@app/hooks/useGenericSettings';
55
import { ImageModerationSettings as ImageModerationSettingsType, SettingsGroupType } from '@app/types/settings.types';
66
import BaseSettingsForm from './BaseSettingsForm';
77
import * as S from './Settings.styles';
8-
const { Option } = Select;
8+
const { Option } = S.SelectField;
99

1010
const ImageModerationSettings: React.FC = () => {
1111
const { settings, loading, error, fetchSettings, updateSettings, saveSettings } =
@@ -79,11 +79,11 @@ const ImageModerationSettings: React.FC = () => {
7979
</span>
8080
}
8181
>
82-
<Select allowClear={true} placeholder="Select a moderation mode">
82+
<S.SelectField allowClear={true} placeholder="Select a moderation mode">
8383
<Option value="basic">Basic Mode (Fastest, detects explicit content only)</Option>
8484
<Option value="strict">Strict Mode (Fast, blocks all buttocks)</Option>
8585
<Option value="full">Full Mode (Most accurate, uses Llama Vision)</Option>
86-
</Select>
86+
</S.SelectField>
8787
</Form.Item>
8888

8989
<Form.Item>

src/components/settings/OllamaSettings.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React, { useEffect, useState } from 'react';
2-
import { Form, Select, Tooltip } from 'antd';
2+
import { Form, Tooltip } from 'antd';
33
import { QuestionCircleOutlined } from '@ant-design/icons';
44
import useGenericSettings from '@app/hooks/useGenericSettings';
55
import { SettingsGroupType } from '@app/types/settings.types';
66
import BaseSettingsForm from './BaseSettingsForm';
7-
import { InputField, InputNumberField } from './Settings.styles';
7+
import { InputField, InputNumberField, SelectField } from './Settings.styles';
88

9-
const { Option } = Select;
9+
const { Option } = SelectField;
1010

1111
const OllamaSettings: React.FC = () => {
1212
const {
@@ -131,7 +131,7 @@ const OllamaSettings: React.FC = () => {
131131
{ required: true, message: 'Please select an Ollama model' }
132132
]}
133133
>
134-
<Select
134+
<SelectField
135135
placeholder="Select a model"
136136
allowClear
137137
showSearch
@@ -144,7 +144,7 @@ const OllamaSettings: React.FC = () => {
144144
{option.label}
145145
</Option>
146146
))}
147-
</Select>
147+
</SelectField>
148148
</Form.Item>
149149

150150
<Form.Item

0 commit comments

Comments
 (0)