update 6 files

master
Reza_ashrafi 2 years ago
parent 9e67bae334
commit 9542fb5b49
  1. 2
      src/components/Drawer.js
  2. 6
      src/screens/Products/components/Header.js
  3. 45
      src/screens/Products/components/Main.js
  4. 2
      src/screens/Profile/components/User.js
  5. 2
      src/screens/Videos/components/MostViewedVideo.js

@ -62,8 +62,6 @@ const Drawer = ({
quality: 1, quality: 1,
}); });
console.log(result);
if (!result.cancelled) { if (!result.cancelled) {
setImage(result.uri); setImage(result.uri);
} }

@ -19,7 +19,7 @@ const Header = ({ setFilterOptions, filterOptions, levels, productTypes }) => {
value={filterOptions.search} value={filterOptions.search}
/> />
<View style={[tw("flex flex-1 flex-row justify-between items-center")]}> <View style={[tw("flex flex-1 flex-row justify-between items-center")]}>
<Select {/* <Select
defaultValue={productTypes[0]} defaultValue={productTypes[0]}
onChange={(name, value) => onChange={(name, value) =>
value !== "نوع محصول" value !== "نوع محصول"
@ -29,7 +29,7 @@ const Header = ({ setFilterOptions, filterOptions, levels, productTypes }) => {
options={productTypes} options={productTypes}
width={"48%"} width={"48%"}
name="productType" name="productType"
/> /> */}
<Select <Select
defaultValue={Object.values(levels)[0]} defaultValue={Object.values(levels)[0]}
onChange={(name, value) => onChange={(name, value) =>
@ -38,7 +38,7 @@ const Header = ({ setFilterOptions, filterOptions, levels, productTypes }) => {
: setFilterOptions({ ...filterOptions, [name]: null }) : setFilterOptions({ ...filterOptions, [name]: null })
} }
options={Object.values(levels)} options={Object.values(levels)}
width={"48%"} width={"100%"}
name="grade" name="grade"
/> />
</View> </View>

@ -176,7 +176,7 @@ const Main = ({ books, filterOptions, grades, mobile, theme, orientation }) => {
}) })
} }
> >
<View style={tw("w-full flex")}> <View style={tw("w-full flex pb-2")}>
<Image <Image
resizeMode="contain" resizeMode="contain"
source={{ source={{
@ -205,7 +205,7 @@ const Main = ({ books, filterOptions, grades, mobile, theme, orientation }) => {
: Colors.theme1.white, : Colors.theme1.white,
}} }}
> >
{"کتاب دیجیتال" + " " + product?.name} { product?.name}
</Text> </Text>
<Text <Text
style={{ style={{
@ -220,7 +220,7 @@ const Main = ({ books, filterOptions, grades, mobile, theme, orientation }) => {
{"پایه" + " " + grades[product?.gradeId]} {"پایه" + " " + grades[product?.gradeId]}
</Text> </Text>
</View> </View>
<View {/* <View
style={tw( style={tw(
"flex flex-row-reverse items-center justify-center pb-1 mt-3" "flex flex-row-reverse items-center justify-center pb-1 mt-3"
)} )}
@ -256,10 +256,10 @@ const Main = ({ books, filterOptions, grades, mobile, theme, orientation }) => {
> >
تومان تومان
</Text> </Text>
</View> </View> */}
</Pressable> </Pressable>
) : null} ) : null}
{( {/* {(
productType productType
? productType === ("محصولات فیزیکی" || "همه محصولات") ? productType === ("محصولات فیزیکی" || "همه محصولات")
: true : true
@ -331,41 +331,8 @@ const Main = ({ books, filterOptions, grades, mobile, theme, orientation }) => {
{"پایه" + " " + grades[product?.gradeId]} {"پایه" + " " + grades[product?.gradeId]}
</Text> </Text>
</View> </View>
<View
style={tw(
"flex flex-row-reverse items-center justify-center pb-1 mt-2"
)}
>
<Text
style={[
tw("text-center ml-1"),
{
color:
theme === "light"
? Colors.theme1.gray20
: Colors.theme1.white,
fontFamily: "bold",
fontSize: mobile ? fontSize.xl2 : fontSize.lg,
},
]}
>
{separate(product?.product[0]?.price)}
</Text>
<Text
style={{
fontSize: fontSize.sm,
color:
theme === "light"
? Colors.theme1.gray20
: Colors.theme1.white,
fontFamily: "regular",
}}
>
تومان
</Text>
</View>
</Pressable> </Pressable>
) : null} ) : null} */}
</React.Fragment> </React.Fragment>
)); ));
}; };

@ -30,8 +30,6 @@ const User = ({ user, mobile, theme }) => {
quality: 1, quality: 1,
}); });
console.log(result);
if (!result.cancelled) { if (!result.cancelled) {
setImage(result.uri); setImage(result.uri);
} }

@ -110,7 +110,7 @@ function MostViewedVideo({ videos, grades, mobile, theme }) {
}, },
]} ]}
> >
{console.log(video?.product?.filter((product) => product?.productType === 4)[0]?.price)} {separate(video?.product?.filter((product) => product?.productType === 4)[0]?.price)}
</Text> </Text>
</View> </View>

Loading…
Cancel
Save