PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
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/Agent/hooks/useThemeVariations.js +7 -5 3.1.33.2.1 View file →
@@ -26,14 +26,16 @@
26 26 }, []),
27 27 };
28 28 };
29 29
30 -export const useThemeVariations = () => {
30 +export const useThemeVariations = ({ enabled = true } = {}) => {
31 31 const { data, error, isLoading } = useSWRImmutable(
32 - {
33 - key: 'theme-variations',
34 - themeSlug: window.extAgentData.context.themeSlug,
35 - },
32 + enabled
33 + ? {
34 + key: 'theme-variations',
35 + themeSlug: window.extAgentData.context.themeSlug,
36 + }
37 + : null,
36 38 fetcher,
37 39 );
38 40 return { variations: data?.variations, error, isLoading };
39 41 };