profile
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// colors.js
|
||||
export default {
|
||||
ligtblue:'#98e2f4',
|
||||
primary: '#F4721E',
|
||||
secondary: '#FF9A62',
|
||||
textPrimary: '#333333',
|
||||
textSecondary: '#666666',
|
||||
background: '#FFFFFF',
|
||||
success: '#008e02',
|
||||
error: '#FF3B30',
|
||||
warning: '#FF9500',
|
||||
info: '#007AFF',
|
||||
};
|
||||
@@ -1,23 +1,20 @@
|
||||
import React from "react";
|
||||
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
|
||||
import { View, Text, StyleSheet, Platform } from "react-native";
|
||||
import { Ionicons } from '@react-native-vector-icons/ionicons';
|
||||
import {Ionicons} from "@react-native-vector-icons/ionicons"; // ✅ corrected import
|
||||
import GroupScreen from "../screens/GroupScreen";
|
||||
import ProfileScreen from "../screens/ProfileScreen";
|
||||
|
||||
const Tab = createBottomTabNavigator();
|
||||
|
||||
const TAB_CONFIG = {
|
||||
activeColor: "#eb87a3ff", // coffee-like orange
|
||||
inactiveColor: "#000000ff",
|
||||
backgroundColor: "#e3e9efff",
|
||||
height: 80,
|
||||
iconSize: 30,
|
||||
labelSize: 12,
|
||||
labelWeight: "600",
|
||||
activeColor: "#000",
|
||||
inactiveColor: "#8e8e93",
|
||||
backgroundColor: "#fff",
|
||||
height: 70,
|
||||
iconSize: 26,
|
||||
};
|
||||
|
||||
// Dummy Screens
|
||||
function HomeScreen() {
|
||||
return (
|
||||
<View style={styles.screen}>
|
||||
@@ -39,18 +36,14 @@ export default function BottomTabs() {
|
||||
<Tab.Navigator
|
||||
screenOptions={({ route }) => ({
|
||||
headerShown: false,
|
||||
tabBarShowLabel: true, // ✅ no labels, only icons
|
||||
tabBarStyle: styles.tabBar,
|
||||
tabBarActiveTintColor: TAB_CONFIG.activeColor,
|
||||
tabBarInactiveTintColor: TAB_CONFIG.inactiveColor,
|
||||
tabBarLabelStyle: {
|
||||
fontSize: TAB_CONFIG.labelSize,
|
||||
fontWeight: TAB_CONFIG.labelWeight as any,
|
||||
marginBottom: Platform.OS === "ios" ? 0 : 5,
|
||||
},
|
||||
|
||||
tabBarIcon: ({ color, focused }) => {
|
||||
let iconName: string = "home-outline";
|
||||
|
||||
if (route.name === "Home") iconName = focused ? "home" : "home-outline";
|
||||
if (route.name === "Home")
|
||||
iconName = focused ? "home" : "home-outline";
|
||||
else if (route.name === "Profile")
|
||||
iconName = focused ? "person" : "person-outline";
|
||||
else if (route.name === "Settings")
|
||||
@@ -58,7 +51,20 @@ export default function BottomTabs() {
|
||||
else if (route.name === "Group")
|
||||
iconName = focused ? "people" : "people-outline";
|
||||
|
||||
return <Ionicons name={iconName} size={TAB_CONFIG.iconSize} color={color} />;
|
||||
return (
|
||||
<View
|
||||
style={[
|
||||
styles.iconContainer,
|
||||
focused && styles.activeIconContainer,
|
||||
]}
|
||||
>
|
||||
<Ionicons
|
||||
name={iconName}
|
||||
size={TAB_CONFIG.iconSize}
|
||||
color={focused ? "#fff" : TAB_CONFIG.inactiveColor}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
})}
|
||||
>
|
||||
@@ -75,7 +81,7 @@ const styles = StyleSheet.create({
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
backgroundColor: "#dae4ed",
|
||||
backgroundColor: "#f5f7fa",
|
||||
},
|
||||
text: {
|
||||
fontSize: 20,
|
||||
@@ -84,19 +90,30 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
tabBar: {
|
||||
position: "absolute",
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 20,
|
||||
left: 20,
|
||||
right: 20,
|
||||
height: TAB_CONFIG.height,
|
||||
backgroundColor: TAB_CONFIG.backgroundColor,
|
||||
borderTopLeftRadius: 30,
|
||||
borderTopRightRadius: 30,
|
||||
borderRadius: 20 ,
|
||||
shadowColor: "#000",
|
||||
shadowOpacity: 0.10,
|
||||
shadowOffset: { width: 0, height: -2 },
|
||||
shadowOpacity: 0.1,
|
||||
shadowOffset: { width: 0, height: 5 },
|
||||
shadowRadius: 8,
|
||||
elevation: 20,
|
||||
paddingTop:10,
|
||||
borderTopWidth: 0,
|
||||
elevation: 10,
|
||||
paddingBottom: Platform.OS === "ios" ? 25 : 10,
|
||||
paddingTop: 10,
|
||||
marginHorizontal:10
|
||||
},
|
||||
iconContainer: {
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
width: 60,
|
||||
height: 60,
|
||||
marginTop:10,
|
||||
borderRadius: 15,
|
||||
},
|
||||
activeIconContainer: {
|
||||
backgroundColor: "#000", // active circle background
|
||||
},
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
} from "react-native";
|
||||
import { RootStackParamList } from "../navigation/AppNavigator";
|
||||
import * as Keychain from "react-native-keychain";
|
||||
import { LOGIN_URL } from "../utils/ApiUrls";
|
||||
import { LOGIN_URL, VARIFY_OTP_URL } from "../utils/ApiUrls";
|
||||
import { StackNavigationProp } from "@react-navigation/stack";
|
||||
|
||||
const theme = {
|
||||
@@ -76,7 +76,7 @@ export default function OtpVerificationScreen() {
|
||||
try {
|
||||
const payload = { mobile, otp };
|
||||
const res = await axios.post(
|
||||
"https://exotic-humpback-mistakenly.ngrok-free.app/api/user/otp/verify",
|
||||
VARIFY_OTP_URL,
|
||||
payload,
|
||||
{ headers: { "Content-Type": "application/json", Accept: "*/*" } }
|
||||
);
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
import * as Keychain from "react-native-keychain";
|
||||
import Ionicons from "react-native-vector-icons/Ionicons";
|
||||
import { launchImageLibrary, ImageLibraryOptions, Asset } from "react-native-image-picker";
|
||||
import { PROFILE_URL } from "../utils/ApiUrls";
|
||||
|
||||
type ButtonType = "primary" | "secondary" | "danger" | "outline";
|
||||
|
||||
@@ -150,7 +151,7 @@ const ProfileScreen = () => {
|
||||
|
||||
setFetching(true);
|
||||
const response = await fetch(
|
||||
"https://exotic-humpback-mistakenly.ngrok-free.app/api/user/profile/view",
|
||||
PROFILE_URL,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export const LOGIN_URL = "https://exotic-humpback-mistakenly.ngrok-free.app/api/user/generate/otp?mobile="
|
||||
export const VARIFY_OTP_URL = "https://exotic-humpback-mistakenly.ngrok-free.app/api/user/otp/verify"
|
||||
export const ORGRAGISTRATION = "https://exotic-humpback-mistakenly.ngrok-free.app/api/organizer/registration/apply"
|
||||
export const GROUP_CREATION_URL = "https://exotic-humpback-mistakenly.ngrok-free.app/api/group/create"
|
||||
export const BASE_URL = "https://api.godemo.in/FundCollect"
|
||||
export const LOGIN_URL = `${BASE_URL}/api/user/generate/otp?mobile=`
|
||||
export const VARIFY_OTP_URL = `${BASE_URL}/api/user/otp/verify`
|
||||
export const ORGRAGISTRATION = `${BASE_URL}/api/organizer/registration/apply`
|
||||
export const GROUP_CREATION_URL = `${BASE_URL}/api/group/create`
|
||||
export const PROFILE_URL =`${BASE_URL}/api/user/profile/view`
|
||||
|
||||
Reference in New Issue
Block a user