reza fixed some issue

master
Reza_ashrafi 3 years ago
parent 39efaaff58
commit 64773078ed
  1. 2
      navigation/index.js
  2. 2
      src/components/Drawer.js
  3. 2
      src/screens/Contact/index.js
  4. 1
      src/screens/Contact/layouts/Box.js
  5. 15
      src/screens/OrdersFollowUp/index.js
  6. 15
      src/screens/Products/index.js
  7. 12
      src/screens/VideoDisplay/index.js

@ -163,7 +163,7 @@ const BottomTabNavigator = ({ theme, userProducts }) => {
name="ProductsTab" name="ProductsTab"
children={() => <ProductsStackScreen theme={theme} />} children={() => <ProductsStackScreen theme={theme} />}
options={{ options={{
title: "کتابها", title: "فروشگاه",
tabBarIcon: ({ focused, color }) => tabBarIcon: ({ focused, color }) =>
focused ? ( focused ? (
<Svg <Svg

@ -270,7 +270,7 @@ const Drawer = ({
{}, {},
]} ]}
onPress={() => { onPress={() => {
navigation.push(route.route); navigation.navigate(route.route);
setBoxPosition(); setBoxPosition();
}} }}
> >

@ -95,7 +95,7 @@ function Contact({ theme }) {
hamburgerMenu: false, hamburgerMenu: false,
title: "", title: "",
bookmark: false, bookmark: false,
qr: true, qr: false,
back: true, back: true,
backgroundColor: Colors.theme1.greenCF + "0F", backgroundColor: Colors.theme1.greenCF + "0F",
}} }}

@ -17,7 +17,6 @@ const ios = Platform.OS === "ios";
const { height, width } = Dimensions.get("window"); const { height, width } = Dimensions.get("window");
const Box = ({ info, mobile }) => { const Box = ({ info, mobile }) => {
console.log(info);
return ( return (
<TouchableOpacity <TouchableOpacity
style={[ style={[

@ -16,6 +16,7 @@ import {
import Order from "./components/Order"; import Order from "./components/Order";
import Navbar from "../../components/Navbar"; import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer"; import Drawer from "../../components/Drawer";
import Empty from "../../components/Empty";
//assets //assets
import b1Image from "./assets/b1.png"; import b1Image from "./assets/b1.png";
@ -32,7 +33,7 @@ function OrdersFollowUp({ orders, getList }) {
React.useEffect(() => { React.useEffect(() => {
getList(); getList();
},[]); }, []);
return ( return (
<SafeAreaView <SafeAreaView
@ -54,6 +55,7 @@ function OrdersFollowUp({ orders, getList }) {
}} }}
/> />
<Drawer setBoxPosition={setBoxPosition} position={position} /> <Drawer setBoxPosition={setBoxPosition} position={position} />
{orders?.length ? (
<ScrollView <ScrollView
contentContainerStyle={styles.contentContainerStyle} contentContainerStyle={styles.contentContainerStyle}
style={styles.container} style={styles.container}
@ -62,6 +64,13 @@ function OrdersFollowUp({ orders, getList }) {
<Order order={order} key={index} /> <Order order={order} key={index} />
))} ))}
</ScrollView> </ScrollView>
) : (
<Empty
text="هیچ موردی برای شما وجود ندارد."
buttonText={"رفتن به فروشگاه"}
buttonAction={() => navigation.push("Products")}
/>
)}
</SafeAreaView> </SafeAreaView>
); );
} }
@ -79,12 +88,12 @@ const styles = StyleSheet.create({
}); });
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
orders: state.userFactor.fullList orders: state.userFactor.fullList,
}); });
const mapDispatchToProps = { const mapDispatchToProps = {
getList: userFactor.fullList, getList: userFactor.fullList,
} };
export default connect(mapStateToProps, mapDispatchToProps)(OrdersFollowUp); export default connect(mapStateToProps, mapDispatchToProps)(OrdersFollowUp);

@ -15,6 +15,7 @@ import { book } from "../../redux/actions";
import Drawer from "../../components/Drawer"; import Drawer from "../../components/Drawer";
import Header from "./components/Header"; import Header from "./components/Header";
import Main from "./components/Main"; import Main from "./components/Main";
import Navbar from "../../components/Navbar";
//style //style
@ -53,9 +54,21 @@ function Products({
position: "relative", position: "relative",
}} }}
> >
<Navbar
setBoxPosition={setBoxPosition}
headerOptions={{
logo: true,
menu: false,
hamburgerMenu: true,
title: "",
bookmark: false,
qr: true,
back: false,
}}
/>
<Drawer setBoxPosition={setBoxPosition} position={position} /> <Drawer setBoxPosition={setBoxPosition} position={position} />
<Header /> <Header />
<ScrollView contentContainerStyle={{ paddingBottom: height / 2.5 }}> <ScrollView contentContainerStyle={{ paddingBottom: height / 2 }}>
<Main books={books} grades={grades} /> <Main books={books} grades={grades} />
</ScrollView> </ScrollView>
</SafeAreaView> </SafeAreaView>

@ -38,6 +38,11 @@ function VideoDisplay({ route, mobile, theme }) {
setPosition(position === "100%" ? "0%" : "100%"); setPosition(position === "100%" ? "0%" : "100%");
}; };
React.useEffect(() => {
video.current.replayAsync();
video.current.playAsync();
}, [route]);
return ( return (
<SafeAreaView <SafeAreaView
style={{ style={{
@ -61,7 +66,7 @@ function VideoDisplay({ route, mobile, theme }) {
<ScrollView <ScrollView
contentContainerStyle={styles.contentContainerStyle} contentContainerStyle={styles.contentContainerStyle}
style={styles.container} style={styles.container}
onLayout={() => setWidth(Dimensions.get("window").width)} onLayout={() => video.current.presentFullscreenPlayer()}
> >
{!mobile ? <View style={tw("mt-5")}></View> : null} {!mobile ? <View style={tw("mt-5")}></View> : null}
<View style={tw("flex ")}> <View style={tw("flex ")}>
@ -72,14 +77,15 @@ function VideoDisplay({ route, mobile, theme }) {
uri: `https://dnvn.ir/api/v1/file/${route.params.unit?.fileIds}`, uri: `https://dnvn.ir/api/v1/file/${route.params.unit?.fileIds}`,
}} }}
useNativeControls useNativeControls
resizeMode="cover" resizeMode="contain"
/> />
<Text <Text
style={{ style={{
fontSize: fontSize.xl, fontSize: fontSize.xl,
fontFamily: "bold", fontFamily: "bold",
marginTop: mobile ? 8 : 12, marginTop: mobile ? 8 : 12,
color: theme === 'light' ? Colors.theme1.gray20 : Colors.theme1.white, color:
theme === "light" ? Colors.theme1.gray20 : Colors.theme1.white,
textAlign: ios ? "right" : "auto", textAlign: ios ? "right" : "auto",
}} }}
> >

Loading…
Cancel
Save