0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00

🐛 Fixed Unsplash integration toggle in Koenig editor (#17725)

no issue

- since Unsplash can be toggled on / off in integrations, we need to
pass that to the Koenig-Lexical editor as well.
This commit is contained in:
Ronald Langeveld 2023-08-15 14:59:26 +02:00 committed by GitHub
parent 50c36a4c17
commit a7530720b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -306,8 +306,7 @@ export default class KoenigLexicalEditor extends Component {
return labels.map(label => label.name);
};
const defaultCardConfig = {
unsplash: {
const unsplashConfig = {
defaultHeaders: {
Authorization: `Client-ID 8672af113b0a8573edae3aa3713886265d9bb741d707f6c01a486cde8c278980`,
'Accept-Version': 'v1',
@ -315,7 +314,10 @@ export default class KoenigLexicalEditor extends Component {
'App-Pragma': 'no-cache',
'X-Unsplash-Cache': true
}
},
};
const defaultCardConfig = {
unsplash: this.settings.unsplash ? unsplashConfig : null,
tenor: this.config.tenor?.googleApiKey ? this.config.tenor : null,
fetchEmbed,
fetchCollectionPosts,