PluginProbe
Extendify / trunk
Extendify vtrunk
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/AutoLaunch/hooks/useInstallRequiredPlugins.js +2 -2 3.1.4 → trunk View file →
@@ -2,10 +2,10 @@
2 2 import { ensurePluginsActive } from '@auto-launch/functions/plugins';
3 3 import { useEffect, useRef } from '@wordpress/element';
4 4 import useSWR from 'swr/immutable';
5 5
6 -export const useInstallRequiredPlugins = () => {
7 - const { data, error } = useSWR('required-plugins', () =>
6 +export const useInstallRequiredPlugins = ({ enabled = true } = {}) => {
7 + const { data, error } = useSWR(enabled ? 'required-plugins' : null, () =>
8 8 handleSitePlugins({ requiredOnly: true }),
9 9 );
10 10 const started = useRef(false);
11 11