feat(image): use image upload field
This commit is contained in:
parent
b33015cbaf
commit
4c410be9ba
@ -23,11 +23,13 @@ import {
|
|||||||
ModPageLoaderResult
|
ModPageLoaderResult
|
||||||
} from '../types'
|
} from '../types'
|
||||||
import { initializeFormState } from '../utils'
|
import { initializeFormState } from '../utils'
|
||||||
import { CheckboxField, InputError, InputField } from './Inputs'
|
import { CheckboxField, InputField, InputFieldWithImageUpload } from './Inputs'
|
||||||
import { OriginalAuthor } from './OriginalAuthor'
|
import { OriginalAuthor } from './OriginalAuthor'
|
||||||
import { CategoryAutocomplete } from './CategoryAutocomplete'
|
import { CategoryAutocomplete } from './CategoryAutocomplete'
|
||||||
import { AlertPopup } from './AlertPopup'
|
import { AlertPopup } from './AlertPopup'
|
||||||
import { Editor, EditorRef } from './Markdown/Editor'
|
import { Editor, EditorRef } from './Markdown/Editor'
|
||||||
|
import { MEDIA_OPTIONS } from 'controllers'
|
||||||
|
import { InputError } from './Inputs/Error'
|
||||||
|
|
||||||
interface GameOption {
|
interface GameOption {
|
||||||
value: string
|
value: string
|
||||||
@ -220,10 +222,9 @@ export const ModForm = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<InputField
|
<InputFieldWithImageUpload
|
||||||
label='Featured Image URL'
|
label='Featured Image URL'
|
||||||
description='We recommend to upload images to https://nostr.build/'
|
description={`We recommend to upload images to ${MEDIA_OPTIONS[0].host}`}
|
||||||
type='text'
|
|
||||||
inputMode='url'
|
inputMode='url'
|
||||||
placeholder='Image URL'
|
placeholder='Image URL'
|
||||||
name='featuredImageUrl'
|
name='featuredImageUrl'
|
||||||
|
@ -7,7 +7,6 @@ import {
|
|||||||
} from 'react-router-dom'
|
} from 'react-router-dom'
|
||||||
import {
|
import {
|
||||||
CheckboxFieldUncontrolled,
|
CheckboxFieldUncontrolled,
|
||||||
InputError,
|
|
||||||
InputFieldUncontrolled
|
InputFieldUncontrolled
|
||||||
} from '../../components/Inputs'
|
} from '../../components/Inputs'
|
||||||
import { ProfileSection } from '../../components/ProfileSection'
|
import { ProfileSection } from '../../components/ProfileSection'
|
||||||
@ -19,6 +18,7 @@ import '../../styles/write.css'
|
|||||||
import { LoadingSpinner } from 'components/LoadingSpinner'
|
import { LoadingSpinner } from 'components/LoadingSpinner'
|
||||||
import { AlertPopup } from 'components/AlertPopup'
|
import { AlertPopup } from 'components/AlertPopup'
|
||||||
import { Editor, EditorRef } from 'components/Markdown/Editor'
|
import { Editor, EditorRef } from 'components/Markdown/Editor'
|
||||||
|
import { InputError } from 'components/Inputs/Error'
|
||||||
|
|
||||||
export const WritePage = () => {
|
export const WritePage = () => {
|
||||||
const userState = useAppSelector((state) => state.user)
|
const userState = useAppSelector((state) => state.user)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user