mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Updated <KoenigComposer> props to use generic cardConfig
object
refs aed55d415d
- `unsplashConfig` has changed to a generic `cardConfig` object
This commit is contained in:
parent
b37aff52ca
commit
d6b8ff124b
1 changed files with 11 additions and 10 deletions
|
@ -109,15 +109,16 @@ export default class KoenigLexicalEditor extends Component {
|
|||
}
|
||||
|
||||
ReactComponent = () => {
|
||||
const API_VERSION = 'v1';
|
||||
const APPLICATION_ID = '8672af113b0a8573edae3aa3713886265d9bb741d707f6c01a486cde8c278980';
|
||||
|
||||
const defaultHeaders = {
|
||||
Authorization: `Client-ID ${APPLICATION_ID}`,
|
||||
'Accept-Version': API_VERSION,
|
||||
const cardConfig = {
|
||||
unsplash: {
|
||||
defaultHeaders: {
|
||||
Authorization: `Client-ID 8672af113b0a8573edae3aa3713886265d9bb741d707f6c01a486cde8c278980`,
|
||||
'Accept-Version': 'v1',
|
||||
'Content-Type': 'application/json',
|
||||
'App-Pragma': 'no-cache',
|
||||
'X-Unsplash-Cache': true
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const [uploadProgress, setUploadProgress] = React.useState(0);
|
||||
|
@ -158,7 +159,7 @@ export default class KoenigLexicalEditor extends Component {
|
|||
<ErrorHandler>
|
||||
<Suspense fallback={<p className="koenig-react-editor-loading">Loading editor...</p>}>
|
||||
<KoenigComposer
|
||||
unsplashConfig={defaultHeaders}
|
||||
cardConfig={cardConfig}
|
||||
initialEditorState={this.args.lexical}
|
||||
onError={this.onError}
|
||||
imageUploadFunction={{imageUploader, uploadProgress}}
|
||||
|
|
Loading…
Add table
Reference in a new issue