Skip to content

Commit

Permalink
Add a hard-coded redirect for lulaoficial.bsky.social (#5303)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee authored Sep 12, 2024
1 parent 897d8ba commit 47bea32
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/view/screens/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {ProfileFeedSection} from '#/screens/Profile/Sections/Feed'
import {ProfileLabelsSection} from '#/screens/Profile/Sections/Labels'
import {ScreenHider} from '#/components/moderation/ScreenHider'
import {ProfileStarterPacks} from '#/components/StarterPack/ProfileStarterPacks'
import {navigate} from '#/Navigation'
import {ExpoScrollForwarderView} from '../../../modules/expo-scroll-forwarder'
import {ProfileFeedgens} from '../com/feeds/ProfileFeedgens'
import {ProfileLists} from '../com/lists/ProfileLists'
Expand Down Expand Up @@ -86,6 +87,16 @@ export function ProfileScreen({route}: Props) {
}
}, [resolveError, refetchDid, refetchProfile])

// Apply hard-coded redirects as need
React.useEffect(() => {
if (resolveError) {
if (name === 'lulaoficial.bsky.social') {
console.log('Applying redirect to lula.com.br')
navigate('Profile', {name: 'lula.com.br'})
}
}
}, [name, resolveError])

// When we open the profile, we want to reset the posts query if we are blocked.
React.useEffect(() => {
if (resolvedDid && profile?.viewer?.blockedBy) {
Expand Down

0 comments on commit 47bea32

Please sign in to comment.