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. 31
      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"
children={() => <ProductsStackScreen theme={theme} />}
options={{
title: "کتابها",
title: "فروشگاه",
tabBarIcon: ({ focused, color }) =>
focused ? (
<Svg

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

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

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

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

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

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

Loading…
Cancel
Save