feat: add provider details, cart, and account screens along with supporting services and components

This commit is contained in:
Tamojit Biswas 2026-07-09 10:22:16 +05:30
parent d7c2254d2e
commit c4c3c22151
7 changed files with 7 additions and 11 deletions

View File

@ -9,7 +9,7 @@ import {
} from 'react-native';
import { getStyles } from './productCard.styles';
import { useAppTheme } from '@theme';
import { getFullUrl } from '@utils/helper';
import { getFullUrl } from '@utils';
export interface ProductCardProps {
id: string;

View File

@ -121,7 +121,7 @@ export const AccountScreen: React.FC = () => {
<View style={styles.profilePhoneRow}>
<Text style={styles.profilePhoneIcon}>📞</Text>
<Text style={styles.profilePhone}>
{user?.mobileNumber || '+91 98765 43210'}
{user?.phone || '+91 98765 43210'}
</Text>
</View>

View File

@ -12,7 +12,7 @@ import {
} from '../../../store/commonreducers/cart';
import { AppStackParamList } from '../../../navigation/appStack';
import { useAppDispatch, useAppSelector } from '@store';
import { getFullUrl } from '../../../utils/helper';
import { getFullUrl } from '@utils';
// import { getFullUrl } from '@utils/helperr';
type CartScreenNavProp = StackNavigationProp<AppStackParamList, 'CartScreen'>;

View File

@ -21,6 +21,7 @@ import { AppStackParamList } from '../../../navigation/appStack';
import { useAppDispatch, useAppSelector } from '@store';
import { getProductDetailsThunk } from './thunk';
import { getDiscountPercentage, formatPrice } from '@components';
import { getFullUrl } from '@utils';
type ProviderDetailsNavProp = StackNavigationProp<
AppStackParamList,
@ -33,12 +34,6 @@ type ProviderDetailsRouteProp = RouteProp<
const { width } = Dimensions.get('window');
const BASE_URL = 'https://2e1b-202-8-116-13.ngrok-free.app';
const getFullUrl = (url?: string) => {
if (!url) return '';
return url.startsWith('/') ? `${BASE_URL}${url}` : url;
};
// TODO: move these into your shared Product type once the backend
// response includes them.
interface ProductReview {

View File

@ -15,7 +15,7 @@ const STORAGE_KEYS = {
} as const;
// ─── Config ──────────────────────────────────────────────────────────────────
const BASE_URL = 'https://9b5b-202-8-116-13.ngrok-free.app'; // TODO: replace with your actual base URL
const BASE_URL = 'https://db1d-202-8-116-13.ngrok-free.app'; // TODO: replace with your actual base URL
// ─── Token Helpers ───────────────────────────────────────────────────────────
export const tokenManager = {

View File

@ -1,5 +1,5 @@
export const getFullUrl = (url?: string) => {
const BASE_URL = 'https://9b5b-202-8-116-13.ngrok-free.app';
const BASE_URL = 'https://db1d-202-8-116-13.ngrok-free.app';
if (!url) return '';
return url.startsWith('/') ? `${BASE_URL}${url}` : url;
};

1
app/utils/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './helper';