Skip to content

Commit

Permalink
sidebar fix and typo (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSghais authored Aug 6, 2024
1 parent 7002b51 commit 375f191
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 97 deletions.
6 changes: 3 additions & 3 deletions apps/mobile/src/app/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ const HomeBottomTabNavigator: React.FC = () => {
/>

<HomeBottomTabsStack.Screen
name="Search"
component={Search as any}
name="Games"
component={Games as any}
// initialParams={{ publicKey }}
options={{
tabBarActiveTintColor: 'white',
tabBarInactiveTintColor: 'grey',
tabBarIcon: ({ focused }) => (
<View style={styles.tabBarIcon}>
<Icon
name="SearchIcon"
name="GameIcon"
size={24}
color={focused ? 'bottomBarActive' : 'bottomBarInactive'}
/>
Expand Down
21 changes: 20 additions & 1 deletion apps/mobile/src/components/Layout/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ const Sidebar = () => {
navigation.navigate("Games");
};

const handleHomeScreen = () => {
navigation.navigate("Home");
};


return (
<View style={styles.sidebar}>
<Text style={styles.sidebarText}>AFK</Text>
Expand All @@ -61,14 +66,28 @@ const Sidebar = () => {
</Pressable> */}

<Pressable
onPress={handleHomeScreen}
style={styles.item}>
<Icon
name="HomeIcon"
size={24}
style={{ backgroundColor: theme.theme.colors.background }}
/>
<Text style={styles.textItem}>
Home
</Text>

</Pressable>


<Pressable
onPress={handleGameScreen}
style={styles.item}>
<Icon
name="GameIcon"
size={24}
style={{backgroundColor:theme.theme.colors.background}}
style={{ backgroundColor: theme.theme.colors.background }}
/>
<Text style={styles.textItem}>
Gamefi
Expand Down
6 changes: 4 additions & 2 deletions apps/mobile/src/components/Layout/sidebar/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ export default ThemedStyleSheet((theme) => ({
height: '100%',
backgroundColor: theme.colors.background,
padding: 20,
gap:1
gap:1,
borderRight:"1"
},
sidebarText: {
fontSize: 18
fontSize: 18,
color: theme.colors.text
},
title: {
fontWeight: 'bold',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const RootScreenContainer: React.FC<ViewProps> = ({ style, children, ...p
const styles = useStyles(stylesheet);
const isWeb = Platform.OS === 'web';
const windowWidth = Dimensions.get('window').width;
const shouldShowSidebar = isWeb && windowWidth >= 768;
const shouldShowSidebar = isWeb && windowWidth >= 1024;
return (
<View style={[styles.container, style]} {...props}>
<View style={styles.content}>
Expand Down
1 change: 0 additions & 1 deletion apps/mobile/src/screens/Profile/Info/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {useQueryClient} from '@tanstack/react-query';
import * as Clipboard from 'expo-clipboard';
import {useState} from 'react';
import {Pressable, View} from 'react-native';

import {UserPlusIcon} from '../../../assets/icons';
import {Button, IconButton, Menu, Text} from '../../../components';
import {useContacts, useEditContacts, useProfile, useStyles, useTheme} from '../../../hooks';
Expand Down
10 changes: 9 additions & 1 deletion apps/mobile/src/types/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type MainStackParams = {
ChannelDetail: {postId: string; post?: NDKEvent};
CreateForm: undefined;
Defi: undefined;
Games:undefined
Games:undefined,
};

export type HomeBottomStackParams = {
Expand All @@ -38,6 +38,8 @@ export type HomeBottomStackParams = {
Notifications: undefined;
Tips: undefined;
Search: undefined;
Games:undefined,

// ChannelsFeed:undefined;
// CreateChannel:undefined;
};
Expand Down Expand Up @@ -92,6 +94,12 @@ export type SearchScreenProps = CompositeScreenProps<
NativeStackScreenProps<RootStackParams>
>;

export type GamesScreenProps = CompositeScreenProps<
NativeStackScreenProps<HomeBottomStackParams, 'Games'>,
NativeStackScreenProps<RootStackParams>
>;


// export type CreateChannelScreenProps = CompositeScreenProps<
// NativeStackScreenProps<HomeBottomStackParams, 'CreateChannel'>,
// NativeStackScreenProps<RootStackParams>
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/app/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function Footer() {
</div>
<div className="flex items-center gap-x-[14px] mt-5 tab:mt-0 self-center tab:self-end">
<a href="https://x.com/AFK_AlignedFamK" target="_blank">
<img src="/assets/twitterIcon.svg" alt="AFK Algined Fam Community Twitter / X" />
<img src="/assets/twitterIcon.svg" alt="AFK Aligned Fam Community Twitter / X" />
</a>

{/* <a
Expand Down
86 changes: 0 additions & 86 deletions turbo copy.json

This file was deleted.

2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"PINATA_API_KEY",
"PINATA_API_SECRET_KEY",
"PINATA_JWT",
"LAUCHING_FACTORY",
"LAUNCHING_FACTORY",
"PINATA_GATEWAY_KEY",
"NEXT_PUBLIC_APP_URL"
]
Expand Down

0 comments on commit 375f191

Please sign in to comment.