import { Form, Input, Button } from 'antd'; import { useI18n } from '../../../i18n'; interface AppConfigKey { key: string; label: string; default?: string; } interface AppSettingsTabProps { config: Record; loading: boolean; onSave: (values: Record) => Promise; configKeys: AppConfigKey[]; } export default function AppSettingsTab({ config, loading, onSave, configKeys, }: AppSettingsTabProps) { const { t } = useI18n(); return (
[key, config[key] ?? def ?? ''])), }} onFinish={onSave} style={{ marginTop: 24 }} key={JSON.stringify(config)} > {configKeys.map(({ key, label }) => ( ))}
); }