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