From e4dafd348416708da0b253cb28dbd72113170c7b Mon Sep 17 00:00:00 2001 From: kmmiio99o Date: Mon, 17 Nov 2025 18:07:14 +0100 Subject: [PATCH] remove broken font previews which causes crashes --- shims/depsModule.ts | 4 ++-- src/core/ui/settings/pages/Fonts/FontCard.tsx | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/shims/depsModule.ts b/shims/depsModule.ts index 8df1d12..63ef118 100644 --- a/shims/depsModule.ts +++ b/shims/depsModule.ts @@ -6,6 +6,6 @@ module.exports = { "util": findByPropsLazy("inspect", "isNullOrUndefined"), "moment": findByPropsLazy("isMoment"), "chroma-js": findByPropsLazy("brewer"), - "lodash": findByPropsLazy("forEachRight"), - "@shopify/react-native-skia": findByPropsLazy("useFont") + "lodash": findByPropsLazy("forEachRight") +// "@shopify/react-native-skia": findByPropsLazy("useFont") }; diff --git a/src/core/ui/settings/pages/Fonts/FontCard.tsx b/src/core/ui/settings/pages/Fonts/FontCard.tsx index 5e90895..08aff33 100644 --- a/src/core/ui/settings/pages/Fonts/FontCard.tsx +++ b/src/core/ui/settings/pages/Fonts/FontCard.tsx @@ -15,15 +15,18 @@ import { Stack, Text, } from "@metro/common/components"; -import * as Skia from "@shopify/react-native-skia"; -import { TextStyleSheet } from "@ui/styles"; -import { useMemo } from "react"; +// import * as Skia from "@shopify/react-native-skia"; // Commented out due to preview crashes +// import { TextStyleSheet } from "@ui/styles"; // Commented out due to preview crashes +// import { useMemo } from "react"; // Commented out due to preview crashes import { View } from "react-native"; import FontEditor from "./FontEditor"; -const { useToken } = lazyDestructure(() => findByProps("useToken")); +const { useToken } = lazyDestructure(() => findByProps("useToken")); // Commented out due to preview crashes +// FontPreview component commented out due to crashes +// tho, who even used this? Lol +/* function FontPreview({ font }: { font: FontDefinition }) { const TEXT_NORMAL = useToken(tokens.colors.TEXT_NORMAL); const { fontFamily: fontFamilyList, fontSize } = @@ -68,6 +71,7 @@ function FontPreview({ font }: { font: FontDefinition }) { ); } +*/ export default function FontCard({ item: font }: CardWrapper) { useProxy(fonts); @@ -82,7 +86,12 @@ export default function FontCard({ item: font }: CardWrapper) { {font.name} - + {/* FontPreview commented out due to crashes */} + + + Preview unavailable + +