fix conditions for newskie dialog
This commit is contained in:
@@ -27,8 +27,6 @@ export function NewskieDialog({
|
||||
const {joinedViaStarterPack} = profile
|
||||
const profileName = profile.displayName || `@${profile.handle}`
|
||||
|
||||
if (!profile.createdAt) return null
|
||||
|
||||
return (
|
||||
<>
|
||||
<Pressable
|
||||
|
||||
@@ -20,12 +20,20 @@ export function ProfileHeaderHandle({
|
||||
const t = useTheme()
|
||||
const invalidHandle = isInvalidHandle(profile.handle)
|
||||
const blockHide = profile.viewer?.blocking || profile.viewer?.blockedBy
|
||||
const createdAt = new Date(profile.createdAt).getTime()
|
||||
|
||||
const isNewskie =
|
||||
profile.createdAt &&
|
||||
createdAt > 0 &&
|
||||
Date.now() + 60e3 * 24 * DAYS_TO_SHOW_NEWSKIE >
|
||||
new Date(profile.createdAt).getTime()
|
||||
|
||||
console.log({
|
||||
date: Date.now() + 60e3 * 24 * DAYS_TO_SHOW_NEWSKIE,
|
||||
createdAt: new Date(profile.createdAt).getTime(),
|
||||
})
|
||||
|
||||
console.log(isNewskie)
|
||||
|
||||
return (
|
||||
<View
|
||||
style={[a.flex_row, a.gap_xs, a.align_center]}
|
||||
|
||||
Reference in New Issue
Block a user