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} horizontal={true}
inverted={true} inverted={true}
style={[tw("flex flex-row mt-3 pb-7")]} style={[tw("flex flex-row mt-3 pb-7")]}
data={blogs} data={blogs.slice(0,7)}
renderItem={({ item }) => ( renderItem={({ item }) => (
<Blog blog={item} mobile={mobile} theme={theme} /> <Blog blog={item} mobile={mobile} theme={theme} />
)} )}

@ -50,7 +50,7 @@ function Scroll({ books, mobile }) {
{ height: mobile ? 245 : 350, direction: "rtl" }, { 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} /> <Product book={book} position={Number(index)} key={index} />
))} ))}
</View> </View>

@ -1,11 +1,4 @@
import { import { View, Text, Image, Pressable, FlatList, Platform } from "react-native";
View,
Text,
Image,
Pressable,
FlatList,
Platform,
} from "react-native";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
import tw from "tailwind-rn"; import tw from "tailwind-rn";
import { connect } from "react-redux"; import { connect } from "react-redux";
@ -24,7 +17,7 @@ function Videos({ videos, grades, mobile, theme }) {
return ( return (
<View style={[tw("w-full mb-5")]}> <View style={[tw("w-full mb-5")]}>
<View style={[tw("w-full flex rounded-md pt-2 overflow-hidden")]}> <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"} /> <Header title="دورههای ویدئویی شما" route={"VOD"} />
</View> </View>
<FlatList <FlatList
@ -32,7 +25,7 @@ function Videos({ videos, grades, mobile, theme }) {
style={[tw("py-3")]} style={[tw("py-3")]}
horizontal={true} horizontal={true}
inverted={true} inverted={true}
data={videos} data={videos.slice(0, 7)}
renderItem={({ item }) => ( renderItem={({ item }) => (
<Video video={item} grades={grades} mobile={mobile} theme={theme} /> <Video video={item} grades={grades} mobile={mobile} theme={theme} />
)} )}
@ -98,7 +91,7 @@ const Video = ({ video, mobile, grades, theme }) => {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
grades: state.publicApi.grades, grades: state.publicApi.grades,
mobile: state.publicApi.mobile, mobile: state.publicApi.mobile,
theme: state.publicApi.theme theme: state.publicApi.theme,
}); });
export default connect(mapStateToProps, {})(Videos); 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"), tw("bg-gray-100 py-3 px-5 text-center rounded-md mx-1.5"),
{ {
fontSize: fontSize.xl5, fontSize: fontSize.xl5,
fontFamily: "demi", fontFamily: "bold",
color: Colors.theme1[props.theme].green79, color: Colors.theme1[props.theme].green79,
width: fontSize.xl5 + 40, width: fontSize.xl5 + 40,
}, },
]} ]}
underlineColorAndroid={"transparent"} underlineColorAndroid={"transparent"}
value={firstCode} value={firstCode}
maxLength={2} maxLength={1}
ref={(ref) => (ref1 = ref)} ref={(ref) => (ref1 = ref)}
onChangeText={(text) => onChangeCode(text, "1")} onChangeText={(text) => onChangeCode(text, "1")}
regex={onInput.numberOnly} 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"), tw("bg-gray-100 py-3 px-5 text-center rounded-md mx-1.5"),
{ {
fontSize: fontSize.xl5, fontSize: fontSize.xl5,
fontFamily: "demi", fontFamily: "bold",
color: Colors.theme1[props.theme].green79, color: Colors.theme1[props.theme].green79,
width: fontSize.xl5 + 40, width: fontSize.xl5 + 40,
}, },
]} ]}
underlineColorAndroid={"transparent"} underlineColorAndroid={"transparent"}
value={secondCode} value={secondCode}
maxLength={2} maxLength={1}
ref={(ref) => (ref2 = ref)} ref={(ref) => (ref2 = ref)}
onChangeText={(text) => onChangeCode(text, "2")} onChangeText={(text) => onChangeCode(text, "2")}
regex={onInput.numberOnly} regex={onInput.numberOnly}
@ -232,7 +232,7 @@ function Otp(props) {
]} ]}
underlineColorAndroid={"transparent"} underlineColorAndroid={"transparent"}
value={thirdCode} value={thirdCode}
maxLength={2} maxLength={1}
ref={(ref) => (ref3 = ref)} ref={(ref) => (ref3 = ref)}
onChangeText={(text) => onChangeCode(text, "3")} onChangeText={(text) => onChangeCode(text, "3")}
regex={onInput.numberOnly} 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"), tw("bg-gray-100 py-3 px-5 text-center rounded-md mx-1.5"),
{ {
fontSize: fontSize.xl5, fontSize: fontSize.xl5,
fontFamily: "demi", fontFamily: "bold",
color: Colors.theme1[props.theme].green79, color: Colors.theme1[props.theme].green79,
width: fontSize.xl5 + 40, width: fontSize.xl5 + 40,
}, },
]} ]}
underlineColorAndroid={"transparent"} underlineColorAndroid={"transparent"}
value={fourthCode} value={fourthCode}
maxLength={2} maxLength={1}
ref={(ref) => (ref4 = ref)} ref={(ref) => (ref4 = ref)}
onChangeText={(text) => onChangeCode(text, "4")} onChangeText={(text) => onChangeCode(text, "4")}
regex={onInput.numberOnly} regex={onInput.numberOnly}

Loading…
Cancel
Save