about summary refs log tree commit diff
path: root/src/view/com/util/Link.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2023-10-25 16:47:21 +0100
committerGitHub <noreply@github.com>2023-10-25 08:47:21 -0700
commit4a4be1de1a3475d034fe9a95493c50222ef90e7e (patch)
tree57e3028f4c746746957185545a905cc4d64a244e /src/view/com/util/Link.tsx
parent32fbb9dba7a0f27993ac4b3d76975ec577464e2d (diff)
downloadvoidsky-4a4be1de1a3475d034fe9a95493c50222ef90e7e.tar.zst
Remove MobX from Link (#1745)
* Remove MobX from Link

* Keep memo() though

We previously had observer() apply it automatically, so re-add it
Diffstat (limited to 'src/view/com/util/Link.tsx')
-rw-r--r--src/view/com/util/Link.tsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/view/com/util/Link.tsx b/src/view/com/util/Link.tsx
index 6915d3e08..35524bcc6 100644
--- a/src/view/com/util/Link.tsx
+++ b/src/view/com/util/Link.tsx
@@ -1,5 +1,4 @@
-import React, {ComponentProps, useMemo} from 'react'
-import {observer} from 'mobx-react-lite'
+import React, {ComponentProps, memo, useMemo} from 'react'
 import {
   Linking,
   GestureResponderEvent,
@@ -50,7 +49,7 @@ interface Props extends ComponentProps<typeof TouchableOpacity> {
   anchorNoUnderline?: boolean
 }
 
-export const Link = observer(function Link({
+export const Link = memo(function Link({
   testID,
   style,
   href,
@@ -136,7 +135,7 @@ export const Link = observer(function Link({
   )
 })
 
-export const TextLink = observer(function TextLink({
+export const TextLink = memo(function TextLink({
   testID,
   type = 'md',
   style,
@@ -236,7 +235,7 @@ interface DesktopWebTextLinkProps extends TextProps {
   accessibilityHint?: string
   title?: string
 }
-export const DesktopWebTextLink = observer(function DesktopWebTextLink({
+export const DesktopWebTextLink = memo(function DesktopWebTextLink({
   testID,
   type = 'md',
   style,