fix conditions for newskie dialog

This commit is contained in:
Hailey
2024-06-14 16:32:15 -07:00
parent e20cd9c1cf
commit 988d41161c
2 changed files with 9 additions and 3 deletions
@@ -27,8 +27,6 @@ export function NewskieDialog({
const {joinedViaStarterPack} = profile
const profileName = profile.displayName || `@${profile.handle}`
if (!profile.createdAt) return null
return (
<>
<Pressable
+9 -1
View File
@@ -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]}