fix last issues
This commit is contained in:
parent
497c556a87
commit
7dd17798c4
7 changed files with 20 additions and 17 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { router, useLocalSearchParams } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import { SafeAreaView, StyleSheet, Text, TextInput, View } from "react-native";
|
||||
import { StyleSheet, Text, TextInput, View } from "react-native";
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { AutoDecimalInput, CustomColorPicker, NavigationButton, TypeSelectorSwitch } from "../../../components";
|
||||
import { addCategory } from "../../../services/database";
|
||||
import { useTheme } from "../../contexts/ThemeContext";
|
||||
|
|
@ -10,18 +11,18 @@ export default function Page() {
|
|||
|
||||
const parameters = useLocalSearchParams();
|
||||
|
||||
const [categoryName, setCategoryName] = useState<string>("Enter Category Name...");
|
||||
const [categoryName, setCategoryName] = useState<string>("");
|
||||
const [categoryColor, setCategoryColor] = useState<string>('#' + Math.floor(Math.random()*16777215).toString(16));
|
||||
const [selectedType, setSelectedType] = useState<string>("expense");
|
||||
const [amount, setAmount] = useState(0);
|
||||
|
||||
return (
|
||||
<SafeAreaView style={[styles.safeAreaViewStyle, {backgroundColor: colors.backgroundColor}]}>
|
||||
<SafeAreaView style={[styles.safeAreaViewStyle, {backgroundColor: colors.backgroundColor}]}>
|
||||
<Text style={[styles.headingTextStyle, {color: colors.primaryText}]}>Add Category</Text>
|
||||
|
||||
<View style={[styles.containerStyle, {backgroundColor: colors.containerColor}]}>
|
||||
<View style={[styles.textInputViewStyle, {backgroundColor: colors.elementDefaultColor}]}>
|
||||
<TextInput placeholder={categoryName} placeholderTextColor={colors.secondaryText} style={[styles.textInputStyle, {color: colors.primaryText}]} onChangeText={(newName: string) => {
|
||||
<TextInput placeholder={"Enter Category Name..."} value={categoryName} placeholderTextColor={colors.secondaryText} style={[styles.textInputStyle, {color: colors.primaryText}]} onChangeText={(newName: string) => {
|
||||
setCategoryName(newName);
|
||||
}}/>
|
||||
</View>
|
||||
|
|
|
|||
Reference in a new issue