diff --git a/apps/mobile/src/components/ui/typography/Markdown.tsx b/apps/mobile/src/components/ui/typography/Markdown.tsx deleted file mode 100644 index 2baf6552c..000000000 --- a/apps/mobile/src/components/ui/typography/Markdown.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import type { FC } from "react" -import { useRef } from "react" -import { Linking } from "react-native" -import type { WebView } from "react-native-webview" - -import MarkdownWeb from "./MarkdownWeb" - -export const Markdown: FC<{ - value: string - style?: React.CSSProperties - className?: string - - webViewProps?: import("expo/dom").DOMProps -}> = ({ value, style, className, webViewProps }) => { - const ref = useRef(null) - - return ( - { - const { type, url } = JSON.parse(event.nativeEvent.data) - if (type === "openLinkInModal") { - Linking.openURL(url) - } - }, - injectedJavaScriptBeforeContentLoaded: `window.openLinkInModal = (url) => { - window.ReactNativeWebView.postMessage(JSON.stringify({ - type: "openLinkInModal", - url, - })) - }`, - }} - /> - ) -} diff --git a/apps/mobile/src/components/ui/typography/MarkdownWeb.tsx b/apps/mobile/src/components/ui/typography/MarkdownWeb.tsx deleted file mode 100644 index c47dc0827..000000000 --- a/apps/mobile/src/components/ui/typography/MarkdownWeb.tsx +++ /dev/null @@ -1,67 +0,0 @@ -"use dom" -import "@/src/global.css" - -import { parseMarkdown } from "@follow/components/utils/parse-markdown.tsx" -import { cn } from "@follow/utils" -import { useMemo } from "react" -import { useDarkMode } from "usehooks-ts" - -import { useCSSInjection } from "@/src/theme/web" - -declare const window: { - openLinkInModal: (url: string) => void -} -/** - * @internal - */ -const MarkdownWeb: WebComponent<{ - value: string - style?: React.CSSProperties - className?: string -}> = ({ value, style, className }) => { - useCSSInjection() - - const { isDarkMode } = useDarkMode() - return ( -
-