Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Holat committed Jul 24, 2023
1 parent 025fd48 commit dd0c06c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 230 deletions.
2 changes: 1 addition & 1 deletion app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ThemeProvider,
} from "@react-navigation/native";
import { useFonts } from "expo-font";
import { SplashScreen, Stack, useNavigation } from "expo-router";
import { SplashScreen, Stack } from "expo-router";
import { useEffect } from "react";
import { useColorScheme } from "react-native";

Expand Down
6 changes: 3 additions & 3 deletions app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from "react-native";
import React, { useState, useEffect } from "react";
import { FontAwesome5 } from "@expo/vector-icons";
import { Link, useRouter } from "expo-router";
import { useRouter } from "expo-router";
import AsyncStorage from "@react-native-async-storage/async-storage";

import Header from "../components/Header";
Expand All @@ -33,7 +33,7 @@ const Home = () => {
const checkUsername = async () => {
const username = await AsyncStorage.getItem("username");
if (!username) {
router.push("./loginScreen");
router.push("loginScreen");
} else {
setUser(username);
}
Expand All @@ -43,7 +43,7 @@ const Home = () => {
<View
style={[styles.cont, DarkMode && { backgroundColor: dark.background2 }]}
>
<Pressable style={styles.history} onPress={() => router.push("./modal")}>
<Pressable style={styles.history} onPress={() => router.push("modal")}>
<FontAwesome5 name="history" size={24} color="lightgray" />
</Pressable>
<Header user={username} />
Expand Down
4 changes: 2 additions & 2 deletions app/loginScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { light } from "../constants/Colors";
import FONT from "../constants/FONT";

const LoginScreen = () => {
const route = useRouter();
const router = useRouter();
const [username, setUser] = useState<string>("");

const saveUser = async () => {
Expand All @@ -25,7 +25,7 @@ const LoginScreen = () => {
}

await AsyncStorage.setItem("username", username);
route.push("index");
router.push("index");
};

return (
Expand Down
228 changes: 6 additions & 222 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"expo": "~48.0.18",
"expo-font": "~11.1.1",
"expo-linking": "~4.0.1",
"expo-router": "^1.5.2",
"expo-router": "^1.0.0",
"expo-splash-screen": "~0.18.2",
"expo-status-bar": "~1.4.4",
"expo-system-ui": "~2.2.1",
Expand All @@ -32,7 +32,8 @@
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "~3.20.0",
"react-native-web": "~0.18.10",
"uuid": "^9.0.0"
"uuid": "^9.0.0",
"expo-constants": "~14.2.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down

0 comments on commit dd0c06c

Please sign in to comment.