Eintrag in SQlite einfügen
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import AsyncStorage from "@react-native-async-storage/async-storage";
|
||||
import * as LocalAuthentication from "expo-local-authentication";
|
||||
import { useRouter } from "expo-router";
|
||||
import * as SQLite from "expo-sqlite";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import {
|
||||
@@ -14,7 +15,6 @@ import {
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from "react-native";
|
||||
import CalendarSync from "../../components/CalendarSync";
|
||||
|
||||
// Types
|
||||
interface User {
|
||||
@@ -42,6 +42,7 @@ export default function AuthScreen() {
|
||||
|
||||
// Database
|
||||
const [db, setDb] = useState<SQLite.SQLiteDatabase | null>(null);
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
initApp();
|
||||
@@ -267,14 +268,10 @@ export default function AuthScreen() {
|
||||
|
||||
<TouchableOpacity
|
||||
style={[styles.submitButton, { marginTop: 20 }]}
|
||||
onPress={() => setShowCalendar((prev) => !prev)}
|
||||
onPress={() => router.push("/calendar")}
|
||||
>
|
||||
<Text style={styles.submitButtonText}>
|
||||
{showCalendar ? "Kalender ausblenden" : "Kalender anzeigen"}
|
||||
</Text>
|
||||
<Text style={styles.submitButtonText}>Zum Kalender</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
{showCalendar && <CalendarSync />}
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user