Skip to content

Commit 72462ac

Browse files
committed
fix: replace Animated.Text with Text component in RelativeDateTime
1 parent cb578e3 commit 72462ac

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

apps/mobile/src/components/ui/datetime/RelativeDateTime.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import dayjs from "dayjs"
22
import { useEffect, useMemo, useState } from "react"
33
import { useTranslation } from "react-i18next"
44
import type { TextProps } from "react-native"
5-
import Animated, { FadeOut } from "react-native-reanimated"
5+
6+
import { Text } from "@/src/components/ui/typography/Text"
67

78
import { NativePressable } from "../pressable/NativePressable"
89

@@ -83,11 +84,11 @@ export const RelativeDateTime = ({
8384
setMode((mode) => (mode === "relative" ? "absolute" : "relative"))
8485
}}
8586
>
86-
<Animated.Text {...props} key={mode} exiting={FadeOut}>
87+
<Text {...props} key={mode}>
8788
{mode === "relative"
8889
? `${relative}${t("space")}${postfixText ?? t("words.ago")}`
8990
: memoizedFormatTime}
90-
</Animated.Text>
91+
</Text>
9192
</NativePressable>
9293
)
9394
}

0 commit comments

Comments
 (0)