()
| 3 | import { useTranslation } from 'next-i18next' |
| 4 | |
| 5 | export const CustomOpenAIKeyForm = () => { |
| 6 | const [showOpenAIForm, setShowOpenAIForm] = useState(false) |
| 7 | const { t } = useTranslation('common') |
| 8 | |
| 9 | return ( |
| 10 | <> |
| 11 | <Container className="pt-20 pb-16 text-center lg:pt-32"> |
| 12 | <div className="mx-auto mt-24 max-w-2xl tracking-tight text-slate-700"> |
| 13 | <div |
| 14 | className="cursor-pointer text-sm text-slate-500 underline" |
| 15 | onClick={() => setShowOpenAIForm(true)} |
| 16 | > |
| 17 | {t('has_openai_key')} |
| 18 | </div> |
| 19 | </div> |
| 20 | |
| 21 | {showOpenAIForm && ( |
| 22 | <div className="mx-auto mt-10 max-w-sm"> |
| 23 | <div className="text-left"> |
| 24 | <div className=" sm:col-span-2"> |
| 25 | <div className="flex flex-col gap-3 text-sm font-medium leading-6 text-gray-900"> |
| 26 | <div>{t('has_openai_key')}</div> |
| 27 | |
| 28 | <div>{t('custom_key_p2')}</div> |
| 29 | |
| 30 | <div>{t('custom_key_p3')}</div> |
| 31 | </div> |
| 32 | </div> |
| 33 | </div> |
| 34 | </div> |
| 35 | )} |
| 36 | </Container> |
| 37 | </> |
| 38 | ) |
| 39 | } |
nothing calls this directly
no outgoing calls
no test coverage detected