From 2133a5bbcbe7b56d79b4959799c850aefd5e4258 Mon Sep 17 00:00:00 2001 From: b3ni15 Date: Sun, 27 Jul 2025 00:51:50 +0200 Subject: [PATCH] Refactor layout and enhance login screen with input fields and styles --- app/_layout.tsx | 2 +- app/index.tsx | 159 ++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 148 insertions(+), 13 deletions(-) diff --git a/app/_layout.tsx b/app/_layout.tsx index c02bd50..caf6187 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -2,5 +2,5 @@ import { Stack } from "expo-router"; import React from "react"; export default function RootLayout() { - return ; + return ; } diff --git a/app/index.tsx b/app/index.tsx index 54479e7..70f10c9 100644 --- a/app/index.tsx +++ b/app/index.tsx @@ -1,6 +1,10 @@ import * as Notifications from 'expo-notifications'; -import React, { useEffect } from "react"; -import { Alert, Button, Platform, Text, View } from "react-native"; +import { StatusBar } from 'expo-status-bar'; +import React, { useEffect, useState } from "react"; +import { Alert, Platform, StyleSheet, Text, TextInput, TouchableOpacity, View } from "react-native"; + +const PRIMARY = '#A24BFA'; +const BG = '#0c0a0a'; Notifications.setNotificationHandler({ handleNotification: async () => ({ @@ -8,7 +12,7 @@ Notifications.setNotificationHandler({ shouldShowList: true, shouldPlaySound: false, shouldSetBadge: false, - }), + }) }); async function registerForPushNotificationsAsync() { @@ -43,20 +47,151 @@ async function sendNotification() { } export default function Index() { + const [username, setUsername] = useState(""); + const [password, setPassword] = useState(""); + useEffect(() => { registerForPushNotificationsAsync(); }, []); return ( - - Edit app/index.tsx to edit this screen. -