Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed feed issue #366

Merged
merged 3 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions apps/mobile/src/app/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ import {ThemedStyleSheet} from '../styles';
// Utilities
import {AuthStackParams, HomeBottomStackParams, MainStackParams, RootStackParams} from '../types';
import {initGoogleAnalytics, logPageView} from '../utils/analytics';
import { ConsoleScreen } from '../screens/Console';

type TabBarIconProps = {
focused: boolean;
Expand Down Expand Up @@ -131,17 +130,6 @@ const HomeBottomTabNavigator: React.FC = () => {
}}
/>


<HomeBottomTabsStack.Screen
name="Console"
component={ConsoleScreen as any}
options={{
tabBarActiveTintColor: 'white',
tabBarInactiveTintColor: 'grey',
tabBarIcon: ({ focused }) => <TabBarIcon focused={focused} name="ConsoleIcon" />,
}}
/>

<HomeBottomTabsStack.Screen
name="Games"
component={Games as any}
Expand Down Expand Up @@ -337,8 +325,6 @@ const MainNavigator: React.FC = () => {
<MainStack.Screen name="Launchpad" component={LaunchpadScreen} />
<MainStack.Screen name="Nameservice" component={NameserviceScreen} />
<MainStack.Screen name="ReceiveEcash" component={ReceiveEcash} />
<MainStack.Screen name="Console" component={ConsoleScreen} />

</MainStack.Navigator>
);
};
Expand Down
8 changes: 3 additions & 5 deletions apps/mobile/src/screens/Feed/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ export const Feed: React.FC<FeedScreenProps> = ({navigation}) => {

const contacts = useContacts({authors: [publicKey]});
const notes = useSearch({
// search: search,
kinds,
limit: 10,
// authors: activeSortBy && contacts?.data?.?? [],
// sortBy: activeSortBy,
limit: 50,
});

// console.log(notes, 'notes');
Expand Down Expand Up @@ -74,7 +71,7 @@ export const Feed: React.FC<FeedScreenProps> = ({navigation}) => {
const filtered = filteredNotes();
setFeedData(filtered as any);
// console.log('feed data is => ', filtered);
}, [search, notes.data?.pages]);
}, []);

useEffect(() => {
console.log(activeSortBy, 'contacts', contacts);
Expand All @@ -86,6 +83,7 @@ export const Feed: React.FC<FeedScreenProps> = ({navigation}) => {
}
}, [activeSortBy]);


const handleNavigate = (id: string) => {
navigation.navigate('WatchStream', {streamId: id});
};
Expand Down
12 changes: 5 additions & 7 deletions packages/afk_nostr_sdk/src/utils/relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@ export const RELAYS_TEST = ['wss://relay.n057r.club', 'wss://relay.nostr.net'];
export const RELAY_AFK_PRODUCTION = 'wss://nostr-relay-nestjs-production.up.railway.app';

export const AFK_RELAYS =
process.env.EXPO_NODE_ENV == 'production' ||
process.env.EXPO_PUBLIC_NODE_ENV == 'production' ||
process.env.NODE_ENV == 'production'
process.env.EXPO_NODE_ENV === 'production' ||
process.env.EXPO_PUBLIC_NODE_ENV === 'production' ||
process.env.NODE_ENV === 'production'
? [
// 'wss://nostr.joyboy.community',
'wss://nostr-relay-nestjs-production.up.railway.app',
...RELAYS_PROD,
'wss://nostr-relay-nestjs-production.up.railway.app',
]
: [
'ws://nostr-relay-nestjs-production.up.railway.app',
'wss://nostr-relay-nestjs-production.up.railway.app',
...RELAYS_TEST,
// 'ws://localhost:8080', // comment if you don't run a relayer in localhost
// 'ws://localhost:3000', // comment if you don't run a relayer in localhost
];

// export const AFK_RELAYS = [
Expand Down
Loading