remove precacheThreadPostProfiles (#3729)
* remove `precacheThreadPostProfiles` * add `displayName` to `PreviewableUserAvatar` * memo * use `precacheProfile` * pass `profile` directly to `PreviewableUserAvatar` * update the `UserAvatar`'s props * remove feed cache * one more spot * rm unused queryClient * Don't call fn unnecessarily * Preload for display name too * try notification item * add to feeditem * and finally, precache for post threads * timestamp * Fix * onBeforePress --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from 'react'
|
||||
import {ago} from 'lib/strings/time'
|
||||
|
||||
import {useTickEveryMinute} from '#/state/shell'
|
||||
import {ago} from 'lib/strings/time'
|
||||
|
||||
// FIXME(dan): Figure out why the false positives
|
||||
|
||||
@@ -12,7 +13,7 @@ export function TimeElapsed({
|
||||
children: ({timeElapsed}: {timeElapsed: string}) => JSX.Element
|
||||
}) {
|
||||
const tick = useTickEveryMinute()
|
||||
const [timeElapsed, setTimeAgo] = React.useState(ago(timestamp))
|
||||
const [timeElapsed, setTimeAgo] = React.useState(() => ago(timestamp))
|
||||
|
||||
React.useEffect(() => {
|
||||
setTimeAgo(ago(timestamp))
|
||||
|
||||
Reference in New Issue
Block a user