From 128ee41252b1bf9c3e415ec94ce26d5dc3e7c7ee Mon Sep 17 00:00:00 2001
From: Vendicated <vendicated@riseup.net>
Date: Sat, 25 Feb 2023 19:10:01 +0100
Subject: ErrorBoundary: Do not use any Discord components to be more robust

---
 src/components/ErrorCard.tsx | 23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

(limited to 'src/components/ErrorCard.tsx')

diff --git a/src/components/ErrorCard.tsx b/src/components/ErrorCard.tsx
index e749ea4..7ce8cad 100644
--- a/src/components/ErrorCard.tsx
+++ b/src/components/ErrorCard.tsx
@@ -16,24 +16,15 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
 
-import { Card } from "@webpack/common";
+import "./ErrorCard.css";
 
-interface Props {
-    style?: React.CSSProperties;
-    className?: string;
-}
-export function ErrorCard(props: React.PropsWithChildren<Props>) {
+import { classes } from "@utils/misc";
+import type { HTMLProps } from "react";
+
+export function ErrorCard(props: React.PropsWithChildren<HTMLProps<HTMLDivElement>>) {
     return (
-        <Card className={props.className} style={
-            {
-                padding: "2em",
-                backgroundColor: "#e7828430",
-                borderColor: "#e78284",
-                color: "var(--text-normal)",
-                ...props.style
-            }
-        }>
+        <div {...props} className={classes(props.className, "vc-error-card")}>
             {props.children}
-        </Card>
+        </div>
     );
 }
-- 
cgit 

