import React, { useEffect, useState } from 'react' import Button from '../Buttons/Button' import InputWithButton from '../Forms/InputWithButton' import ButtonActionProvider from '../Actions/ButtonActionProvider' import getElementorGlobalStyleTemplates from '../../api/getElementorGlobalStyleTemplates' import saveElementorGlobalStyleTemplate from '../../api/saveElementorGlobalStyleTemplate' import LoadingAnimation from '../Loading/LoadingAnimation' import styles from './Elementor.module.scss' const SaveElementorGlobalStylesButton = ({ text, disabled = false, onClick = null }) => { return ( ) } const Elementor = () => { const { loading: availableGlobalTemplatesLoading, data: availableGlobalTemplates } = getElementorGlobalStyleTemplates() const [stateGlobalStyleTemplate, setStateGlobalStyleTemplate] = useState(null) const [globalStyleTemplateError, setGlobalStyleTemplateError] = useState(null) const [globalStyleTemplateSaved, setGlobalStyleTemplateSaved] = useState(false) useEffect(() => { // each time our local state changes we update our saved state to false. setGlobalStyleTemplateSaved(false) setGlobalStyleTemplateError(null) }, [stateGlobalStyleTemplate]) useEffect(() => { if (availableGlobalTemplates) { const defaultTemplate = availableGlobalTemplates.find(template => template.default) if (defaultTemplate) { setStateGlobalStyleTemplate(defaultTemplate.id) } } }, [availableGlobalTemplates]) return ( <>
Some Template Kits include "Global Site Settings", if applied these can effect your entire website. Site Settings can be modified from the Elementor Hamburger Menu » Site Settings. You can change which global site settings are applied to your website below.
{availableGlobalTemplatesLoading || !availableGlobalTemplates.length ? (