|
|
@ -5,6 +5,7 @@ import {darksalmonColor, purpleColor, whiteColor} from "../assets/Theme";
|
|
|
|
import {useDispatch, useSelector} from "react-redux";
|
|
|
|
import {useDispatch, useSelector} from "react-redux";
|
|
|
|
import React, {useEffect, useState} from "react";
|
|
|
|
import React, {useEffect, useState} from "react";
|
|
|
|
import {getCustomJokesList, getSampleJokesList} from "../redux/thunk/GetThunk";
|
|
|
|
import {getCustomJokesList, getSampleJokesList} from "../redux/thunk/GetThunk";
|
|
|
|
|
|
|
|
import {useTheme} from "@react-navigation/native";
|
|
|
|
const eye = require("../assets/eye_icon.png")
|
|
|
|
const eye = require("../assets/eye_icon.png")
|
|
|
|
const hideEye = require("../assets/eye_off_icon.png")
|
|
|
|
const hideEye = require("../assets/eye_off_icon.png")
|
|
|
|
|
|
|
|
|
|
|
@ -39,6 +40,8 @@ export default function Catalogue() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, [dispatch, customJokes, sampleJokes]);
|
|
|
|
}, [dispatch, customJokes, sampleJokes]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const styles = themeSettings()
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<SafeAreaView style={styles.container}>
|
|
|
|
<SafeAreaView style={styles.container}>
|
|
|
|
<View style={styles.columnContainer}>
|
|
|
|
<View style={styles.columnContainer}>
|
|
|
@ -59,38 +62,41 @@ export default function Catalogue() {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
export function themeSettings() {
|
|
|
|
|
|
|
|
const theme = useTheme();
|
|
|
|
|
|
|
|
const colors = theme.colors;
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
container: {
|
|
|
|
backgroundColor: purpleColor,
|
|
|
|
backgroundColor: colors.background,
|
|
|
|
flex:1,
|
|
|
|
flex: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Button:{
|
|
|
|
Button: {
|
|
|
|
borderRadius : 5,
|
|
|
|
borderRadius: 5,
|
|
|
|
backgroundColor : darksalmonColor,
|
|
|
|
backgroundColor: colors.primary,
|
|
|
|
height:40,
|
|
|
|
height: 40,
|
|
|
|
width : 60,
|
|
|
|
width: 60,
|
|
|
|
flexDirection : "row"
|
|
|
|
flexDirection: "row"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
jokeTypeContainer :{
|
|
|
|
jokeTypeContainer: {
|
|
|
|
display : "flex",
|
|
|
|
display: "flex",
|
|
|
|
flex : 1,
|
|
|
|
flex: 1,
|
|
|
|
flexDirection: "row",
|
|
|
|
flexDirection: "row",
|
|
|
|
alignItems : "center"
|
|
|
|
alignItems: "center"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
imageButton : {
|
|
|
|
imageButton: {
|
|
|
|
margin : 10,
|
|
|
|
margin: 10,
|
|
|
|
width: 40,
|
|
|
|
width: 40,
|
|
|
|
height:30,
|
|
|
|
height: 30,
|
|
|
|
top : 5,
|
|
|
|
top: 5,
|
|
|
|
alignSelf : "center",
|
|
|
|
alignSelf: "center",
|
|
|
|
backgroundColor: "none",
|
|
|
|
backgroundColor: "none",
|
|
|
|
tintColor : whiteColor,
|
|
|
|
tintColor: colors.notification,
|
|
|
|
justifyContent: "center",
|
|
|
|
justifyContent: "center",
|
|
|
|
alignItems: "center",
|
|
|
|
alignItems: "center",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
TextButton : {
|
|
|
|
TextButton: {
|
|
|
|
fontSize: 18,
|
|
|
|
fontSize: 18,
|
|
|
|
color: whiteColor,
|
|
|
|
color: colors.text,
|
|
|
|
textAlign: 'center',
|
|
|
|
textAlign: 'center',
|
|
|
|
fontWeight: 'bold',
|
|
|
|
fontWeight: 'bold',
|
|
|
|
margin: 10,
|
|
|
|
margin: 10,
|
|
|
@ -103,4 +109,6 @@ const styles = StyleSheet.create({
|
|
|
|
justifyContent: "space-between",
|
|
|
|
justifyContent: "space-between",
|
|
|
|
alignItems: "center",
|
|
|
|
alignItems: "center",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
return styles
|
|
|
|
|
|
|
|
}
|