芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/www/wp-content/plugins/blocksy-companion/static/js/dashboard/screens/Extension.js
import { useEffect, createElement, Fragment, useContext, } from '@wordpress/element' import { Transition, animated } from 'blocksy-options' import { __ } from 'ct-i18n' import useExtsStatus from './Extensions/useExtsStatus' import Sidebar from './Extensions/Sidebar' import CurrentExtension from './Extensions/CurrentExtension' import SubmitSupport from '../helpers/SubmitSupport' import DashboardContext from '../DashboardContext' import NoLicense from '../NoLicense' const Extension = (props) => { const { history } = useContext(DashboardContext) const { navigate } = props const { forceEmptyExts, exts_status, syncExts, isLoading, setExtsStatus } = useExtsStatus() let currentExtension = null if (exts_status[props.extension]) { currentExtension = { ...exts_status[props.extension], name: props.extension, } } if (forceEmptyExts) { return
} return (
{ return phase === 'leave' ? { duration: 300, } : { delay: 300, duration: 300, } }}> {(isLoading) => { if (isLoading) { return (props) => (
{__( 'Loading Extensions Status...', 'blocksy-companion' )}
) } return (props) => (
{ return syncExts({ ...payload, extension: currentExtension.name, }) }} />
) }}
) } export default Extension