reza fixed otp login inputs font and length && Home items length

master
Reza_ashrafi 3 years ago
parent 1bd25c083b
commit 976723c402
  1. 2
      src/screens/Home/components/Blogs.js
  2. 2
      src/screens/Home/components/Scroll.js
  3. 15
      src/screens/Home/components/Videos.js
  4. 14
      src/screens/Otp/index.js

@ -38,7 +38,7 @@ function Blogs({ blogs, mobile, theme }) {
horizontal={true}
inverted={true}
style={[tw("flex flex-row mt-3 pb-7")]}
data={blogs}
data={blogs.slice(0,7)}
renderItem={({ item }) => (
<Blog blog={item} mobile={mobile} theme={theme} />
)}

@ -50,7 +50,7 @@ function Scroll({ books, mobile }) {
{ height: mobile ? 245 : 350, direction: "rtl" },
]}
>
{books.map((book, index) => (
{books.slice(0,14).map((book, index) => (
<Product book={book} position={Number(index)} key={index} />
))}
</View>

@ -1,11 +1,4 @@
import {
View,
Text,
Image,
Pressable,
FlatList,
Platform,
} from "react-native";
import { View, Text, Image, Pressable, FlatList, Platform } from "react-native";
import { useNavigation } from "@react-navigation/native";
import tw from "tailwind-rn";
import { connect } from "react-redux";
@ -24,7 +17,7 @@ function Videos({ videos, grades, mobile, theme }) {
return (
<View style={[tw("w-full mb-5")]}>
<View style={[tw("w-full flex rounded-md pt-2 overflow-hidden")]}>
<View style={tw('flex px-4')}>
<View style={tw("flex px-4")}>
<Header title="دورههای ویدئویی شما" route={"VOD"} />
</View>
<FlatList
@ -32,7 +25,7 @@ function Videos({ videos, grades, mobile, theme }) {
style={[tw("py-3")]}
horizontal={true}
inverted={true}
data={videos}
data={videos.slice(0, 7)}
renderItem={({ item }) => (
<Video video={item} grades={grades} mobile={mobile} theme={theme} />
)}
@ -98,7 +91,7 @@ const Video = ({ video, mobile, grades, theme }) => {
const mapStateToProps = (state) => ({
grades: state.publicApi.grades,
mobile: state.publicApi.mobile,
theme: state.publicApi.theme
theme: state.publicApi.theme,
});
export default connect(mapStateToProps, {})(Videos);

@ -187,14 +187,14 @@ function Otp(props) {
tw("bg-gray-100 py-3 px-5 text-center rounded-md mx-1.5"),
{
fontSize: fontSize.xl5,
fontFamily: "demi",
fontFamily: "bold",
color: Colors.theme1[props.theme].green79,
width: fontSize.xl5 + 40,
},
]}
underlineColorAndroid={"transparent"}
value={firstCode}
maxLength={2}
maxLength={1}
ref={(ref) => (ref1 = ref)}
onChangeText={(text) => onChangeCode(text, "1")}
regex={onInput.numberOnly}
@ -206,14 +206,14 @@ function Otp(props) {
tw("bg-gray-100 py-3 px-5 text-center rounded-md mx-1.5"),
{
fontSize: fontSize.xl5,
fontFamily: "demi",
fontFamily: "bold",
color: Colors.theme1[props.theme].green79,
width: fontSize.xl5 + 40,
},
]}
underlineColorAndroid={"transparent"}
value={secondCode}
maxLength={2}
maxLength={1}
ref={(ref) => (ref2 = ref)}
onChangeText={(text) => onChangeCode(text, "2")}
regex={onInput.numberOnly}
@ -232,7 +232,7 @@ function Otp(props) {
]}
underlineColorAndroid={"transparent"}
value={thirdCode}
maxLength={2}
maxLength={1}
ref={(ref) => (ref3 = ref)}
onChangeText={(text) => onChangeCode(text, "3")}
regex={onInput.numberOnly}
@ -244,14 +244,14 @@ function Otp(props) {
tw("bg-gray-100 py-3 px-5 text-center rounded-md mx-1.5"),
{
fontSize: fontSize.xl5,
fontFamily: "demi",
fontFamily: "bold",
color: Colors.theme1[props.theme].green79,
width: fontSize.xl5 + 40,
},
]}
underlineColorAndroid={"transparent"}
value={fourthCode}
maxLength={2}
maxLength={1}
ref={(ref) => (ref4 = ref)}
onChangeText={(text) => onChangeCode(text, "4")}
regex={onInput.numberOnly}

Loading…
Cancel
Save