reza fixed some issue

master
Reza_ashrafi 3 years ago
parent 7505ab4ee0
commit 81c2c27249
  1. 6
      src/redux/reducers/public.js
  2. 3
      src/screens/QR/layouts/Scan/index.js
  3. 6
      src/screens/Video/index.js

@ -6,7 +6,7 @@ const width = Dimensions.get("window").width;
const initialState = { const initialState = {
ltr: false, ltr: false,
theme: null, theme: null,
mobile : width < 720, mobile: width < 720,
homeData: [], homeData: [],
newProducts: [], newProducts: [],
levels: [], levels: [],
@ -43,7 +43,7 @@ const initialState = {
categories: null, categories: null,
bookSection: null, bookSection: null,
grades: { grades: {
0: 'پایه تحصیلی', 0: "پایه تحصیلی",
// _0: "پیش دبستان", // _0: "پیش دبستان",
1: "اول", 1: "اول",
2: "دوم", 2: "دوم",
@ -79,7 +79,7 @@ const publicApi = (state = initialState, action) => {
let { type, data } = action; let { type, data } = action;
switch (type) { switch (type) {
case "public/setLtr": case "public/setLtr":
return { ...state, ltr : true }; return { ...state, ltr: true };
case "public/setIsDark": case "public/setIsDark":
AsyncStorage.setItem("theme", data); AsyncStorage.setItem("theme", data);
return { ...state, location: false, error: null, theme: data }; return { ...state, location: false, error: null, theme: data };

@ -31,9 +31,6 @@ function Scan({ theme, page }) {
const { status } = await BarCodeScanner.requestPermissionsAsync(); const { status } = await BarCodeScanner.requestPermissionsAsync();
setHasPermission(status === "granted"); setHasPermission(status === "granted");
})(); })();
if (page === "book") {
navigation.push("QRContent", { data : "zist10-13" });
}
}, []); }, []);
const handleBarCodeScanned = React.useCallback( const handleBarCodeScanned = React.useCallback(

@ -142,7 +142,7 @@ function Product({
fontFamily: "demi", fontFamily: "demi",
}} }}
> >
{book?.name} {book?.name || " "}
</Text> </Text>
<Text <Text
style={{ style={{
@ -155,7 +155,7 @@ function Product({
fontFamily: "regular", fontFamily: "regular",
}} }}
> >
{"پایه" + " " + grades[book?.gradeId]} {"پایه" + " " + (grades[book?.gradeId] || " ")}
</Text> </Text>
</View> </View>
</View> </View>
@ -207,7 +207,7 @@ function Product({
{seasons {seasons
?.sort((a, b) => a[0]?.categoryId - b[0]?.categoryId) ?.sort((a, b) => a[0]?.categoryId - b[0]?.categoryId)
?.map((season, index) => ( ?.map((season, index) => (
<Season season={season} key={index} id={book?.id} /> <Season season={season} key={index} id={book?.id} index={index} />
))} ))}
</View> </View>
</ScrollView> </ScrollView>

Loading…
Cancel
Save