From a92bae80e070439f307a7863d0d920cd2cebeb5d Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:32:40 -0400 Subject: [PATCH] Fix Userplugincard error --- .../PluginSettings/LinkIconButton.css | 2 +- src/components/PluginSettings/PluginModal.css | 2 +- .../PluginSettings/PluginStatCards.tsx | 112 +++++++++--------- 3 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/components/PluginSettings/LinkIconButton.css b/src/components/PluginSettings/LinkIconButton.css index 1055d6c7..9db19f9d 100644 --- a/src/components/PluginSettings/LinkIconButton.css +++ b/src/components/PluginSettings/LinkIconButton.css @@ -9,4 +9,4 @@ .vc-settings-modal-links { display: flex; gap: 0.2em; -} +} \ No newline at end of file diff --git a/src/components/PluginSettings/PluginModal.css b/src/components/PluginSettings/PluginModal.css index 1f4b9aaa..ee2bec39 100644 --- a/src/components/PluginSettings/PluginModal.css +++ b/src/components/PluginSettings/PluginModal.css @@ -4,4 +4,4 @@ .vc-plugin-modal-description { flex-grow: 1; -} +} \ No newline at end of file diff --git a/src/components/PluginSettings/PluginStatCards.tsx b/src/components/PluginSettings/PluginStatCards.tsx index ba2207bc..2e027380 100644 --- a/src/components/PluginSettings/PluginStatCards.tsx +++ b/src/components/PluginSettings/PluginStatCards.tsx @@ -9,64 +9,64 @@ import "./styles.css"; import { Text, Tooltip } from "@webpack/common"; export function StockPluginsCard({ totalStockPlugins, enabledStockPlugins }) { - return ( -
-
-
- Enabled Plugins - {enabledStockPlugins} + return ( +
+
+
+ Enabled Plugins + {enabledStockPlugins} +
+
+
+ Total Plugins + {totalStockPlugins} +
+
-
-
- Total Plugins - {totalStockPlugins} -
-
-
- ); + ); } export function UserPluginsCard({ totalUserPlugins, enabledUserPlugins }) { - if (totalUserPlugins <= 1) - return ( -
-
-
- Total Userplugins - - } - > - {(tooltipProps) => ( - - - {totalUserPlugins} - - - )} - -
-
-
- ); - else - return ( -
-
-
- Enabled Userplugins - {enabledUserPlugins} -
-
-
- Total Userplugins - {totalUserPlugins} -
-
-
- ); + if (totalUserPlugins === 0) + return ( +
+
+
+ Total Userplugins + + } + > + {tooltipProps => ( + + + {totalUserPlugins} + + + )} + +
+
+
+ ); + else + return ( +
+
+
+ Enabled Userplugins + {enabledUserPlugins} +
+
+
+ Total Userplugins + {totalUserPlugins} +
+
+
+ ); }