Commit d41b6f01 authored by Neosoulink's avatar Neosoulink
Browse files

feat: create product details screen

parent 2e4028a3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -59,6 +59,13 @@ const DRAWER_ROUTES: DrawerScreenType[] = [
			unmountOnBlur: true,
		},
	},
	{
		name: 'DRAWER/PRODUCT_DETAILS',
		component: SCREENS.APP.ProductDetails,
		options: {
			unmountOnBlur: true,
		},
	},
];

export default DRAWER_ROUTES;
+50 −0
Original line number Diff line number Diff line
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native';

// STORE
import { useAppSelector } from '../../store/hooks';
import { getLanguage } from '../../store/features/translation';

// COMPONENTS
import { CustomScreenHeader } from '../../components/Common';

// STYLES
import { GLOBAL_STYLE as GS } from '../../assets/ts/styles';

const ProductDetails = () => {
	// ROUTE
	const ROUTE = useRoute();

	// NAVIGATION
	const NAIGATION = useNavigation();

	// SELECTORS
	const LANGUAGE = useAppSelector(getLanguage);

	// LOCAL STYLES
	const STYLES = StyleSheet.create({
		main: {},
	});

	// FUNCTIONS

	// EFFECTS
	React.useEffect(() => {
		console.log('ROUTE?.params ===>', ROUTE?.params);
		return () => {};
	}, [ROUTE?.params]);

	return (
		<View style={GS.screen}>
			<CustomScreenHeader
				title={LANGUAGE.PRODUCTS_VIEW.DETAILS.DETAILS}
				showBackBtn
			/>

			<Text>ProductDetails</Text>
		</View>
	);
};

export default ProductDetails;
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ import TranslationScreen from './app/Translation.screen';
import SearchScreen from './app/Search.screen';
import MerchantsSearchScreen from './app/MerchantsSearch.screen';
import InStoreScreen from './app/InStore.screen';
import ProductDetailsScreen from './app/ProductDetails';

// TODO: create a type for screens object

@@ -29,6 +30,7 @@ const SCREENS = {
		Search: SearchScreen,
		MerchantsSearch: MerchantsSearchScreen,
		InStore: InStoreScreen,
		ProductDetails: ProductDetailsScreen,
	},
	REGISTRATION: {
		SIGN_UP: SignUpScreen,