|
|
|
@ -4,6 +4,7 @@ import React, { useCallback, useState } from 'react'
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
import Input from './input'
|
|
|
|
import Input from './input'
|
|
|
|
import Button from '@/app/components/base/button'
|
|
|
|
import Button from '@/app/components/base/button'
|
|
|
|
|
|
|
|
import { useDocLink } from '@/context/i18n'
|
|
|
|
|
|
|
|
|
|
|
|
const I18N_PREFIX = 'datasetCreation.stepOne.website'
|
|
|
|
const I18N_PREFIX = 'datasetCreation.stepOne.website'
|
|
|
|
|
|
|
|
|
|
|
|
@ -17,6 +18,7 @@ const UrlInput: FC<Props> = ({
|
|
|
|
onRun,
|
|
|
|
onRun,
|
|
|
|
}) => {
|
|
|
|
}) => {
|
|
|
|
const { t } = useTranslation()
|
|
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
const docLink = useDocLink()
|
|
|
|
const [url, setUrl] = useState('')
|
|
|
|
const [url, setUrl] = useState('')
|
|
|
|
const handleUrlChange = useCallback((url: string | number) => {
|
|
|
|
const handleUrlChange = useCallback((url: string | number) => {
|
|
|
|
setUrl(url as string)
|
|
|
|
setUrl(url as string)
|
|
|
|
@ -32,7 +34,7 @@ const UrlInput: FC<Props> = ({
|
|
|
|
<Input
|
|
|
|
<Input
|
|
|
|
value={url}
|
|
|
|
value={url}
|
|
|
|
onChange={handleUrlChange}
|
|
|
|
onChange={handleUrlChange}
|
|
|
|
placeholder='https://docs.dify.ai'
|
|
|
|
placeholder={docLink()}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
variant='primary'
|
|
|
|
variant='primary'
|
|
|
|
|