reza added some bug fix

master
Reza_ashrafi 3 years ago
parent 2530a593b3
commit 3c7c2a0df0
  1. 1
      navigation/index.js
  2. BIN
      src/assets/video.mp4
  3. 18
      src/components/Navbar.js
  4. 14
      src/screens/Faq/index.js
  5. 12
      src/screens/Login/index.js
  6. 4
      src/screens/VideoDisplay/index.js

@ -196,6 +196,7 @@ const Navigation = ({}) => {
<Stack.Screen name="Login" component={Login} />
<Stack.Screen name="Otp" component={Otp} />
<Stack.Screen name="Root" component={BottomTabNavigator} />
</Stack.Navigator>
</NavigationContainer>
);

Binary file not shown.

@ -48,9 +48,9 @@ const Navbar = ({ notification, setBoxPosition, headerOptions }) => {
<View
style={[tw(
"w-full flex flex-row-reverse justify-between h-16 bg-white items-center px-0"
), {backgroundColor : headerOptions.backgroundColor ? headerOptions.backgroundColor : 'white'}]}
), {backgroundColor : headerOptions?.backgroundColor ? headerOptions?.backgroundColor : 'white'}]}
>
{!headerOptions.title && headerOptions.back ? (
{!headerOptions?.title && headerOptions?.back ? (
<Ionicons
name="arrow-forward"
style={tw("mr-2")}
@ -59,7 +59,7 @@ const Navbar = ({ notification, setBoxPosition, headerOptions }) => {
onPress={() => navigation.goBack()}
/>
) : null}
{headerOptions.title ? (
{headerOptions?.title ? (
<Text
style={{
fontFamily: "bold",
@ -71,7 +71,7 @@ const Navbar = ({ notification, setBoxPosition, headerOptions }) => {
{headerOptions?.title}
</Text>
) : null}
{headerOptions.hamburgerMenu && (
{headerOptions?.hamburgerMenu && (
<Pressable style={tw("relative mr-4")} onPress={() => setBoxPosition()}>
<Image
source={hamburgerLightIcon}
@ -87,7 +87,7 @@ const Navbar = ({ notification, setBoxPosition, headerOptions }) => {
</Pressable>
)}
{headerOptions.logo && (
{headerOptions?.logo && (
<Pressable
onPress={() => navigation.navigate("Home")}
style={tw("absolute right-1/2 top-1/2")}
@ -106,7 +106,7 @@ const Navbar = ({ notification, setBoxPosition, headerOptions }) => {
)}
<View style={tw("flex flex-row items-center ml-4")}>
{headerOptions.back && headerOptions.title ? (
{headerOptions?.back && headerOptions?.title ? (
<Ionicons
name="arrow-back"
style={tw("mr-2")}
@ -115,13 +115,13 @@ const Navbar = ({ notification, setBoxPosition, headerOptions }) => {
onPress={() => navigation.goBack()}
/>
) : null}
{headerOptions.qr && (
{headerOptions?.qr && (
<>
<Button icon={qrLightIcon} route={"QR"} />
<Button icon={arLightIcon} route={"ar"} />
</>
)}
{headerOptions.bookmark && (
{headerOptions?.bookmark && (
<Ionicons
name="bookmark-outline"
style={tw("mr-2")}
@ -130,7 +130,7 @@ const Navbar = ({ notification, setBoxPosition, headerOptions }) => {
onPress={() => navigation.goBack()}
/>
)}
{headerOptions.menu && (
{headerOptions?.menu && (
<Entypo name="dots-three-vertical" size={24} color="#196EC0" />
)}
</View>

@ -38,7 +38,19 @@ function Faq(props) {
position: "relative",
}}
>
<Navbar setBoxPosition={setBoxPosition} />
<Navbar
setBoxPosition={setBoxPosition}
headerOptions={{
logo: true,
menu: false,
hamburgerMenu: true,
title: "",
bookmark: false,
qr: true,
back: false,
backgroundColor: "#E9F0F7",
}}
/>
<Drawer setBoxPosition={setBoxPosition} position={position} />
<ScrollView
contentContainerStyle={styles.contentContainerStyle}

@ -8,6 +8,7 @@ import {
ActivityIndicator,
Dimensions,
TouchableHighlight,
KeyboardAvoidingView
} from "react-native";
import Logo from "./assets/logo.png";
import CustomTextInput from "../../components/CustomTextInput";
@ -68,17 +69,6 @@ function Login(props) {
>
{"سلام"}
</Text>
{/* <Text
style={[tw('w-full mt-2'),{
fontSize: width / 34,
color: "#6f7074",
fontFamily: "regular"
}]}
>
{
"به دانوین خوش اومدی برای عضویت و ادامه شماره موبایلت رو وارد کن و روی گزینه ثبت بزن"
}
</Text> */}
<View style={[tw("w-full rounded-md overflow-hidden relative"), {}]}>
<CustomTextInput
label="شماره موبایل"

@ -14,7 +14,7 @@ import Drawer from "../../components/Drawer";
import { Video, AVPlaybackStatus } from "expo-av";
import tw from "tailwind-rn";
import Season from "./components/Season";
// import movie from "../../assets/video.mp4";
import movie from "../../assets/video.mp4";
const { height, width } = Dimensions.get("window");
@ -23,7 +23,7 @@ function VideoDisplay({
type: "کتاب ها",
name: "ریاضی",
grade: "پایه هفتم ابتدایی",
// video: movie,
video: movie,
season: {
name: "فصل اول: مباحث جوشش مواد مذاب در مرکز زمین",
duration: "2:30:13",

Loading…
Cancel
Save