Skip to content

Commit

Permalink
added simple feed
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeroxander committed Sep 25, 2024
1 parent 97054cf commit a751957
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/lib/api/feed/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class HomeFeedAPI implements FeedAPI {
this.following = new FollowingFeedAPI({agent})
this.discover = new CustomFeedAPI({
agent,
feedParams: {feed: PROD_DEFAULT_FEED('whats-hot')},
feedParams: {feed: PROD_DEFAULT_FEED('aaactgbfpm2iy')},
})
this.userInterests = userInterests
}
Expand All @@ -54,7 +54,7 @@ export class HomeFeedAPI implements FeedAPI {
this.following = new FollowingFeedAPI({agent: this.agent})
this.discover = new CustomFeedAPI({
agent: this.agent,
feedParams: {feed: PROD_DEFAULT_FEED('whats-hot')},
feedParams: {feed: PROD_DEFAULT_FEED('aaactgbfpm2iy')},
userInterests: this.userInterests,
})
this.usingDiscover = false
Expand Down
4 changes: 2 additions & 2 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function IS_PROD_SERVICE(url?: string) {
}

export const PROD_DEFAULT_FEED = (rkey: string) =>
`at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/${rkey}`
`at://did:plc:2zlzmv2xujgpohsvay3xhpbr/app.bsky.feed.generator/${rkey}`

export const POST_IMG_MAX = {
width: 2000,
Expand Down Expand Up @@ -107,7 +107,7 @@ export const BSKY_FEED_OWNER_DIDS = [
]

export const DISCOVER_FEED_URI =
'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot'
'at://did:plc:2zlzmv2xujgpohsvay3xhpbr/app.bsky.feed.generator/aaactgbfpm2iy'
export const DISCOVER_SAVED_FEED = {
type: 'feed',
value: DISCOVER_FEED_URI,
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Profile/Header/Handle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function ProfileHeaderHandle({
let ethAddress = ''
if (
useResolveDidQueryResult.data &&
useResolveDidQueryResult.data.alsoKnownAs[1]
useResolveDidQueryResult.data.alsoKnownAs[1] !== undefined
) {
const parts = useResolveDidQueryResult.data.alsoKnownAs[1].split(':')
const ethereumAddress = parts[2]
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Profile/Header/ProfileHeaderStandard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ let ProfileHeaderStandard = ({
let fullEthAddress = ''
if (
useResolveDidQueryResult.data &&
useResolveDidQueryResult.data.alsoKnownAs[1]
useResolveDidQueryResult.data.alsoKnownAs[1] !== undefined
) {
const parts = useResolveDidQueryResult.data.alsoKnownAs[1].split(':')
const ethereumAddress = parts[2]
Expand Down
17 changes: 16 additions & 1 deletion src/screens/Signup/StepInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import * as EmailValidator from 'email-validator'
import type tldts from 'tldts'
import {useAccount} from 'wagmi'

import {usePalette} from '#/lib/hooks/usePalette'
import {logEvent} from '#/lib/statsig/statsig'
import {isEmailMaybeInvalid} from '#/lib/strings/email'
import {logger} from '#/logger'
import {TextLink} from '#/view/com/util/Link'
import {WalletComponents} from '#/screens/Login/LoginWallet'
import {ScreenTransition} from '#/screens/Login/ScreenTransition'
import {is13, is18, useSignupContext} from '#/screens/Signup/state'
Expand Down Expand Up @@ -51,6 +53,7 @@ export function StepInfo({
const emailValueRef = useRef<string>(state.email)
const prevEmailValueRef = useRef<string>(state.email)
const account = useAccount()
const pal = usePalette('default')

const [hasWarnedEmail, setHasWarnedEmail] = React.useState<boolean>(false)

Expand Down Expand Up @@ -153,7 +156,19 @@ export function StepInfo({
{state.serviceDescription.inviteCodeRequired && (
<View>
<TextField.LabelText>
<Trans>Invite code</Trans>
<Trans>Invite code needed, DM @Aer0xander</Trans> on
<TextLink
style={pal.link}
href="https://x.com/aer0xander"
text=" Twitter "
/>
or
<TextLink
style={pal.link}
href="https://warpcast.com/aer0xander"
text=" Warpcast "
/>
for an invite!
</TextField.LabelText>
<TextField.Root>
<TextField.Icon icon={Ticket} />
Expand Down
2 changes: 1 addition & 1 deletion src/state/queries/preferences/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export function useReplaceForYouWithDiscoverFeedMutation() {
await agent.addSavedFeeds([
{
type: 'feed',
value: PROD_DEFAULT_FEED('whats-hot'),
value: PROD_DEFAULT_FEED('aaactgbfpm2iy'),
pinned: true,
},
])
Expand Down
2 changes: 1 addition & 1 deletion src/view/screens/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function HomeScreenReady({
<FeedPage
testID="customFeedPage"
isPageFocused
feed={`feedgen|${PROD_DEFAULT_FEED('crypto')}`}
feed={`aaactgbfpm2iy|${PROD_DEFAULT_FEED('aaactgbfpm2iy')}`}
renderEmptyState={renderCustomFeedEmptyState}
/>
</Pager>
Expand Down
4 changes: 3 additions & 1 deletion src/view/shell/index.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {useColorSchemeStyle} from '#/lib/hooks/useColorSchemeStyle'
import {useWebBodyScrollLock} from '#/lib/hooks/useWebBodyScrollLock'
import {NavigationProp} from '#/lib/routes/types'
import {colors, s} from '#/lib/styles'
import {useSession} from '#/state/session'
import {useIsDrawerOpen, useSetDrawerOpen} from '#/state/shell'
import {useCloseAllActiveElements} from '#/state/util'
import {UniversalWallet} from '#/view/com/util/UniversalWallet'
Expand All @@ -29,6 +30,7 @@ function ShellInner() {
const navigator = useNavigation<NavigationProp>()
const closeAllActiveElements = useCloseAllActiveElements()
const {_} = useLingui()
const {hasSession} = useSession()

useWebBodyScrollLock(isDrawerOpen)

Expand All @@ -50,7 +52,7 @@ function ShellInner() {
<SigninDialog />
<Lightbox />
<PortalOutlet />
{!isDesktop && <UniversalWallet />}
{hasSession && !isDesktop && <UniversalWallet />}

{!isDesktop && isDrawerOpen && (
<TouchableWithoutFeedback
Expand Down

0 comments on commit a751957

Please sign in to comment.