Skip to content

Commit

Permalink
removed sign up refresh when field is filled, removed email confirmat…
Browse files Browse the repository at this point in the history
…ion popup
  • Loading branch information
Aeroxander committed Dec 11, 2024
1 parent a751957 commit 343433a
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 23 deletions.
20 changes: 10 additions & 10 deletions src/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ import {RouteParams, State} from '#/lib/routes/types'
import {attachRouteToLogEvents, logEvent} from '#/lib/statsig/statsig'
import {bskyTitle} from '#/lib/strings/headings'
import {isAndroid, isNative, isWeb} from '#/platform/detection'
import {useModalControls} from '#/state/modals'
//import {useModalControls} from '#/state/modals'
import {useUnreadNotifications} from '#/state/queries/notifications/unread'
import {useSession} from '#/state/session'
import {
shouldRequestEmailConfirmation,
snoozeEmailConfirmationPrompt,
} from '#/state/shell/reminders'
// import {
// shouldRequestEmailConfirmation,
// snoozeEmailConfirmationPrompt,
// } from '#/state/shell/reminders'
import {AccessibilitySettingsScreen} from '#/view/screens/AccessibilitySettings'
import {AppPasswords} from '#/view/screens/AppPasswords'
import {CommunityGuidelinesScreen} from '#/view/screens/CommunityGuidelines'
Expand Down Expand Up @@ -642,17 +642,17 @@ const LINKING = {
function RoutesContainer({children}: React.PropsWithChildren<{}>) {
const theme = useColorSchemeStyle(DefaultTheme, DarkTheme)
const {currentAccount} = useSession()
const {openModal} = useModalControls()
//const {openModal} = useModalControls()
const prevLoggedRouteName = React.useRef<string | undefined>(undefined)

function onReady() {
prevLoggedRouteName.current = getCurrentRouteName()
initAnalytics(currentAccount)

if (currentAccount && shouldRequestEmailConfirmation(currentAccount)) {
openModal({name: 'verify-email', showReminder: true})
snoozeEmailConfirmationPrompt()
}
// if (currentAccount && shouldRequestEmailConfirmation(currentAccount)) {
// openModal({name: 'verify-email', showReminder: true})
// snoozeEmailConfirmationPrompt()
// }
}

return (
Expand Down
2 changes: 1 addition & 1 deletion src/lib/analytics/analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function getClient(): SegmentClient {
segmentClient = createClient({
writeKey: '8I6DsgfiSLuoONyaunGoiQM7A6y2ybdI',
trackAppLifecycleEvents: false,
proxy: 'https://api.events.bsky.app/v1',
proxy: 'https://api.events.creaton.io/v1',
})
}
return segmentClient
Expand Down
2 changes: 1 addition & 1 deletion src/lib/analytics/analytics.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function getClient(): SegmentClient {
{
integrations: {
'Segment.io': {
apiHost: 'api.events.bsky.app/v1',
apiHost: 'api.events.creaton.io/v1',
},
},
},
Expand Down
13 changes: 8 additions & 5 deletions src/screens/Profile/Header/Handle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ export function ProfileHeaderHandle({
let ethAddress = ''
if (
useResolveDidQueryResult.data &&
useResolveDidQueryResult.data.alsoKnownAs[1] !== undefined
Array.isArray(useResolveDidQueryResult.data.alsoKnownAs) &&
useResolveDidQueryResult.data.alsoKnownAs.length > 1
) {
const parts = useResolveDidQueryResult.data.alsoKnownAs[1].split(':')
const ethereumAddress = parts[2]
const formattedEthAddress = ethereumAddress.slice(0, 6)
if (parts.length > 2) {
const ethereumAddress = parts[2]
const formattedEthAddress = ethereumAddress.slice(0, 6)

const lastChars = ethereumAddress.slice(-4)
const lastChars = ethereumAddress.slice(-4)

ethAddress = formattedEthAddress + '...' + lastChars
ethAddress = formattedEthAddress + '...' + lastChars
}
}

return (
Expand Down
9 changes: 6 additions & 3 deletions src/screens/Profile/Header/ProfileHeaderStandard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,14 @@ let ProfileHeaderStandard = ({
let fullEthAddress = ''
if (
useResolveDidQueryResult.data &&
useResolveDidQueryResult.data.alsoKnownAs[1] !== undefined
Array.isArray(useResolveDidQueryResult.data.alsoKnownAs) &&
useResolveDidQueryResult.data.alsoKnownAs.length > 1
) {
const parts = useResolveDidQueryResult.data.alsoKnownAs[1].split(':')
const ethereumAddress = parts[2]
fullEthAddress = ethereumAddress
if (parts.length > 2) {
const ethereumAddress = parts[2]
fullEthAddress = ethereumAddress
}
}

const onPressFollow = () => {
Expand Down
6 changes: 4 additions & 2 deletions src/screens/Signup/StepInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ export function StepInfo({
}
/>
</View>
{state.isLoading || isLoadingStarterPack ? (
{(state.isLoading || isLoadingStarterPack) &&
!inviteCodeValueRef.current &&
!emailValueRef.current ? (
<View style={[a.align_center]}>
<Loader size="xl" />
</View>
Expand All @@ -156,7 +158,7 @@ export function StepInfo({
{state.serviceDescription.inviteCodeRequired && (
<View>
<TextField.LabelText>
<Trans>Invite code needed, DM @Aer0xander</Trans> on
Invite code needed, DM @Aer0xander on
<TextLink
style={pal.link}
href="https://x.com/aer0xander"
Expand Down
2 changes: 2 additions & 0 deletions src/state/feed-feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ export function useFeedFeedbackContext() {
// -prf
function isDiscoverFeed(feed: FeedDescriptor) {
return feed === `feedgen|${PROD_DEFAULT_FEED('whats-hot')}`

//return feed === `feedgen|${PROD_DEFAULT_FEED('aaactgbfpm2iy')}`
}

function toString(interaction: AppBskyFeedDefs.Interaction): string {
Expand Down
3 changes: 2 additions & 1 deletion src/state/queries/resolve-uri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {

import {STALE} from '#/state/queries'
import {useAgent} from '#/state/session'
import {IS_DEV} from '#/env'
import {profileBasicQueryKey as RQKEY_PROFILE_BASIC} from './profile'

const RQKEY_ROOT = 'resolved-did'
Expand Down Expand Up @@ -65,7 +66,7 @@ export function useResolveDidDocQuery(did: any | undefined) {
queryFn: async () => {
if (!did) return ''

const url = 'https://plc.directory/'
const url = IS_DEV ? 'http://localhost:2583/' : 'https://plc.directory/'
try {
const response = await fetch(url + did)
if (!response.ok) {
Expand Down

0 comments on commit 343433a

Please sign in to comment.