|
|
|
@ -8,6 +8,7 @@ import {darksalmonColor, greyColor, indigoColor, purpleColor, whiteColor} from "
|
|
|
|
|
import {getCustomJokesList, getSampleJokesList} from "../redux/thunk/GetThunk";
|
|
|
|
|
import React, {useEffect} from "react";
|
|
|
|
|
import {postCustomJoke} from "../redux/thunk/PostThunk";
|
|
|
|
|
import {useTheme} from "@react-navigation/native";
|
|
|
|
|
|
|
|
|
|
export default function AddScreen() {
|
|
|
|
|
// @ts-ignore
|
|
|
|
@ -31,6 +32,8 @@ export default function AddScreen() {
|
|
|
|
|
clearFields();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const styles = themeSettings()
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<View style={styles.container}>
|
|
|
|
|
<Text style={styles.text}>Blague</Text>
|
|
|
|
@ -85,16 +88,19 @@ export default function AddScreen() {
|
|
|
|
|
)
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function themeSettings() {
|
|
|
|
|
const theme = useTheme();
|
|
|
|
|
const colors = theme.colors;
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
|
container: {
|
|
|
|
|
|
|
|
|
|
backgroundColor: purpleColor,
|
|
|
|
|
backgroundColor: colors.background,
|
|
|
|
|
width: "100%",
|
|
|
|
|
height: "100%",
|
|
|
|
|
},
|
|
|
|
|
textInput: {
|
|
|
|
|
backgroundColor: indigoColor,
|
|
|
|
|
color: whiteColor,
|
|
|
|
|
backgroundColor: colors.card,
|
|
|
|
|
color: colors.text,
|
|
|
|
|
width: "90%",
|
|
|
|
|
alignSelf: "center",
|
|
|
|
|
minHeight: 100
|
|
|
|
@ -102,14 +108,14 @@ const styles = StyleSheet.create({
|
|
|
|
|
eraseButton: {
|
|
|
|
|
borderRadius: 5,
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
backgroundColor : whiteColor,
|
|
|
|
|
backgroundColor: colors.primary,
|
|
|
|
|
height: 50,
|
|
|
|
|
margin: 10
|
|
|
|
|
},
|
|
|
|
|
createButton: {
|
|
|
|
|
borderRadius: 5,
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
backgroundColor : darksalmonColor,
|
|
|
|
|
backgroundColor: colors.primary,
|
|
|
|
|
height: 50,
|
|
|
|
|
margin: 10,
|
|
|
|
|
marginTop: 30
|
|
|
|
@ -118,16 +124,16 @@ const styles = StyleSheet.create({
|
|
|
|
|
margin: 10,
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
fontWeight: "700",
|
|
|
|
|
color : whiteColor,
|
|
|
|
|
color: colors.text,
|
|
|
|
|
},
|
|
|
|
|
eraseTextButton: {
|
|
|
|
|
margin: 10,
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
fontWeight: "700",
|
|
|
|
|
color : darksalmonColor,
|
|
|
|
|
color: colors.text,
|
|
|
|
|
},
|
|
|
|
|
text: {
|
|
|
|
|
color:whiteColor,
|
|
|
|
|
color: colors.text,
|
|
|
|
|
paddingBottom: 10,
|
|
|
|
|
paddingTop: 25,
|
|
|
|
|
marginLeft: 19,
|
|
|
|
@ -137,7 +143,7 @@ const styles = StyleSheet.create({
|
|
|
|
|
paddingTop: 15,
|
|
|
|
|
marginRight: 19,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
color: whiteColor,
|
|
|
|
|
color: colors.text,
|
|
|
|
|
},
|
|
|
|
|
viewCounter: {
|
|
|
|
|
alignItems: 'flex-end',
|
|
|
|
@ -145,3 +151,5 @@ const styles = StyleSheet.create({
|
|
|
|
|
right: 10,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return styles
|
|
|
|
|
}
|