PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.14
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.14
1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 1.3.47 1.3.46 1.3.45 All 177 releases
disco / backend / views / components / CompatiblePluginList / App.jsx

App.jsx in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.14, at backend/views/components/CompatiblePluginList/App.jsx

32 lines 933 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { useMemo } from 'react';
2 import HeroSection from './components/HeroSection';
3 import PluginGrid from './components/PluginGrid';
4 import getPlugins from './data/plugins';
5
6 export default function CompatiblePluginListApp() {
7 const plugins = useMemo(() => {
8 const raw = window.DISCO_COMPATIBLE_PLUGINS?.active_plugins ?? [];
9 const activePlugins = Array.isArray( raw ) ? raw : Object.values( raw );
10
11 const withStatus = getPlugins().map((plugin) => ({
12 ...plugin,
13 status: activePlugins.includes(plugin.pluginFile)
14 ? 'detected'
15 : 'not-installed',
16 }));
17
18 // Detected plugins first
19 return [
20 ...withStatus.filter((p) => p.status === 'detected'),
21 ...withStatus.filter((p) => p.status !== 'detected'),
22 ];
23 }, []);
24
25 return (
26 <div className="disco:min-h-screen disco:bg-white disco:font-sans disco:my-4 disco:mr-4 disco:rounded-2xl">
27 <HeroSection />
28 <PluginGrid plugins={plugins} />
29 </div>
30 );
31 }
32