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 React from "react";
|
||||||
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
|
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
|
||||||
import { View, Text, StyleSheet, Platform } from "react-native";
|
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 GroupScreen from "../screens/GroupScreen";
|
||||||
import ProfileScreen from "../screens/ProfileScreen";
|
import ProfileScreen from "../screens/ProfileScreen";
|
||||||
|
|
||||||
const Tab = createBottomTabNavigator();
|
const Tab = createBottomTabNavigator();
|
||||||
|
|
||||||
const TAB_CONFIG = {
|
const TAB_CONFIG = {
|
||||||
activeColor: "#eb87a3ff", // coffee-like orange
|
activeColor: "#000",
|
||||||
inactiveColor: "#000000ff",
|
inactiveColor: "#8e8e93",
|
||||||
backgroundColor: "#e3e9efff",
|
backgroundColor: "#fff",
|
||||||
height: 80,
|
height: 70,
|
||||||
iconSize: 30,
|
iconSize: 26,
|
||||||
labelSize: 12,
|
|
||||||
labelWeight: "600",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Dummy Screens
|
|
||||||
function HomeScreen() {
|
function HomeScreen() {
|
||||||
return (
|
return (
|
||||||
<View style={styles.screen}>
|
<View style={styles.screen}>
|
||||||
@@ -39,18 +36,14 @@ export default function BottomTabs() {
|
|||||||
<Tab.Navigator
|
<Tab.Navigator
|
||||||
screenOptions={({ route }) => ({
|
screenOptions={({ route }) => ({
|
||||||
headerShown: false,
|
headerShown: false,
|
||||||
|
tabBarShowLabel: true, // ✅ no labels, only icons
|
||||||
tabBarStyle: styles.tabBar,
|
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 }) => {
|
tabBarIcon: ({ color, focused }) => {
|
||||||
let iconName: string = "home-outline";
|
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")
|
else if (route.name === "Profile")
|
||||||
iconName = focused ? "person" : "person-outline";
|
iconName = focused ? "person" : "person-outline";
|
||||||
else if (route.name === "Settings")
|
else if (route.name === "Settings")
|
||||||
@@ -58,7 +51,20 @@ export default function BottomTabs() {
|
|||||||
else if (route.name === "Group")
|
else if (route.name === "Group")
|
||||||
iconName = focused ? "people" : "people-outline";
|
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,
|
flex: 1,
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
backgroundColor: "#dae4ed",
|
backgroundColor: "#f5f7fa",
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
@@ -84,19 +90,30 @@ const styles = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
tabBar: {
|
tabBar: {
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
bottom: 0,
|
bottom: 20,
|
||||||
left: 0,
|
left: 20,
|
||||||
right: 0,
|
right: 20,
|
||||||
height: TAB_CONFIG.height,
|
height: TAB_CONFIG.height,
|
||||||
backgroundColor: TAB_CONFIG.backgroundColor,
|
backgroundColor: TAB_CONFIG.backgroundColor,
|
||||||
borderTopLeftRadius: 30,
|
borderRadius: 20 ,
|
||||||
borderTopRightRadius: 30,
|
|
||||||
shadowColor: "#000",
|
shadowColor: "#000",
|
||||||
shadowOpacity: 0.10,
|
shadowOpacity: 0.1,
|
||||||
shadowOffset: { width: 0, height: -2 },
|
shadowOffset: { width: 0, height: 5 },
|
||||||
shadowRadius: 8,
|
shadowRadius: 8,
|
||||||
elevation: 20,
|
elevation: 10,
|
||||||
paddingTop:10,
|
paddingBottom: Platform.OS === "ios" ? 25 : 10,
|
||||||
borderTopWidth: 0,
|
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";
|
} from "react-native";
|
||||||
import { RootStackParamList } from "../navigation/AppNavigator";
|
import { RootStackParamList } from "../navigation/AppNavigator";
|
||||||
import * as Keychain from "react-native-keychain";
|
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";
|
import { StackNavigationProp } from "@react-navigation/stack";
|
||||||
|
|
||||||
const theme = {
|
const theme = {
|
||||||
@@ -76,7 +76,7 @@ export default function OtpVerificationScreen() {
|
|||||||
try {
|
try {
|
||||||
const payload = { mobile, otp };
|
const payload = { mobile, otp };
|
||||||
const res = await axios.post(
|
const res = await axios.post(
|
||||||
"https://exotic-humpback-mistakenly.ngrok-free.app/api/user/otp/verify",
|
VARIFY_OTP_URL,
|
||||||
payload,
|
payload,
|
||||||
{ headers: { "Content-Type": "application/json", Accept: "*/*" } }
|
{ headers: { "Content-Type": "application/json", Accept: "*/*" } }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import {
|
|||||||
import * as Keychain from "react-native-keychain";
|
import * as Keychain from "react-native-keychain";
|
||||||
import Ionicons from "react-native-vector-icons/Ionicons";
|
import Ionicons from "react-native-vector-icons/Ionicons";
|
||||||
import { launchImageLibrary, ImageLibraryOptions, Asset } from "react-native-image-picker";
|
import { launchImageLibrary, ImageLibraryOptions, Asset } from "react-native-image-picker";
|
||||||
|
import { PROFILE_URL } from "../utils/ApiUrls";
|
||||||
|
|
||||||
type ButtonType = "primary" | "secondary" | "danger" | "outline";
|
type ButtonType = "primary" | "secondary" | "danger" | "outline";
|
||||||
|
|
||||||
@@ -150,7 +151,7 @@ const ProfileScreen = () => {
|
|||||||
|
|
||||||
setFetching(true);
|
setFetching(true);
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
"https://exotic-humpback-mistakenly.ngrok-free.app/api/user/profile/view",
|
PROFILE_URL,
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
export const LOGIN_URL = "https://exotic-humpback-mistakenly.ngrok-free.app/api/user/generate/otp?mobile="
|
export const BASE_URL = "https://api.godemo.in/FundCollect"
|
||||||
export const VARIFY_OTP_URL = "https://exotic-humpback-mistakenly.ngrok-free.app/api/user/otp/verify"
|
export const LOGIN_URL = `${BASE_URL}/api/user/generate/otp?mobile=`
|
||||||
export const ORGRAGISTRATION = "https://exotic-humpback-mistakenly.ngrok-free.app/api/organizer/registration/apply"
|
export const VARIFY_OTP_URL = `${BASE_URL}/api/user/otp/verify`
|
||||||
export const GROUP_CREATION_URL = "https://exotic-humpback-mistakenly.ngrok-free.app/api/group/create"
|
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