update login, detail table in tripInfo
This commit is contained in:
@@ -10,9 +10,10 @@ import {
|
||||
} from "@/utils/storage";
|
||||
import { parseJwtToken } from "@/utils/token";
|
||||
import { useRouter } from "expo-router";
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Image,
|
||||
KeyboardAvoidingView,
|
||||
Platform,
|
||||
ScrollView,
|
||||
@@ -74,7 +75,7 @@ export default function LoginScreen() {
|
||||
if (response?.data.token) {
|
||||
// Lưu token vào storage nếu cần (thêm logic này sau)
|
||||
console.log("Login Token ");
|
||||
|
||||
|
||||
await setStorageItem(TOKEN, response.data.token);
|
||||
console.log("Token:", response.data.token);
|
||||
router.replace("/(tabs)");
|
||||
@@ -98,9 +99,23 @@ export default function LoginScreen() {
|
||||
<ThemedView style={styles.container}>
|
||||
{/* Header */}
|
||||
<View style={styles.headerContainer}>
|
||||
{/* Logo */}
|
||||
<Image
|
||||
source={require("@/assets/images/logo.png")}
|
||||
style={styles.logo}
|
||||
resizeMode="contain"
|
||||
/>
|
||||
<ThemedText type="title" style={styles.title}>
|
||||
SGW App
|
||||
Hệ thống giám sát tàu cá
|
||||
</ThemedText>
|
||||
{/* Owner Logo */}
|
||||
<View style={styles.ownerContainer}>
|
||||
<Image
|
||||
source={require("@/assets/images/owner.png")}
|
||||
style={styles.ownerLogo}
|
||||
resizeMode="contain"
|
||||
/>
|
||||
</View>
|
||||
<ThemedText style={styles.subtitle}>
|
||||
Đăng nhập để tiếp tục
|
||||
</ThemedText>
|
||||
@@ -160,6 +175,13 @@ export default function LoginScreen() {
|
||||
<Text style={styles.linkText}>Đăng ký ngay</Text>
|
||||
</ThemedText>
|
||||
</View>
|
||||
|
||||
{/* Copyright */}
|
||||
<View style={styles.copyrightContainer}>
|
||||
<ThemedText style={styles.copyrightText}>
|
||||
© {new Date().getFullYear()} - Sản phẩm của Mobifone
|
||||
</ThemedText>
|
||||
</View>
|
||||
</View>
|
||||
</ThemedView>
|
||||
</ScrollView>
|
||||
@@ -181,8 +203,13 @@ const styles = StyleSheet.create({
|
||||
marginBottom: 40,
|
||||
alignItems: "center",
|
||||
},
|
||||
logo: {
|
||||
width: 120,
|
||||
height: 120,
|
||||
marginBottom: 20,
|
||||
},
|
||||
title: {
|
||||
fontSize: 32,
|
||||
fontSize: 28,
|
||||
fontWeight: "bold",
|
||||
marginBottom: 8,
|
||||
},
|
||||
@@ -236,4 +263,20 @@ const styles = StyleSheet.create({
|
||||
color: "#007AFF",
|
||||
fontWeight: "600",
|
||||
},
|
||||
ownerContainer: {
|
||||
alignItems: "center",
|
||||
},
|
||||
ownerLogo: {
|
||||
width: 150,
|
||||
height: 50,
|
||||
},
|
||||
copyrightContainer: {
|
||||
marginTop: 20,
|
||||
alignItems: "center",
|
||||
},
|
||||
copyrightText: {
|
||||
fontSize: 12,
|
||||
opacity: 0.6,
|
||||
textAlign: "center",
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user