From dd0c06cd89782da37d31f7db7b6b168f0d7e0a6c Mon Sep 17 00:00:00 2001 From: Holat <105239299+Holat@users.noreply.github.com> Date: Mon, 24 Jul 2023 20:32:52 +0100 Subject: [PATCH] v1.0.0 --- app/_layout.tsx | 2 +- app/index.tsx | 6 +- app/loginScreen.tsx | 4 +- package-lock.json | 228 ++------------------------------------------ package.json | 5 +- 5 files changed, 15 insertions(+), 230 deletions(-) diff --git a/app/_layout.tsx b/app/_layout.tsx index bad5928..9c49cae 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -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"; diff --git a/app/index.tsx b/app/index.tsx index bb2b28b..944ea7f 100644 --- a/app/index.tsx +++ b/app/index.tsx @@ -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"; @@ -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); } @@ -43,7 +43,7 @@ const Home = () => { - router.push("./modal")}> + router.push("modal")}>
diff --git a/app/loginScreen.tsx b/app/loginScreen.tsx index 9b170a8..a0d742a 100644 --- a/app/loginScreen.tsx +++ b/app/loginScreen.tsx @@ -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(""); const saveUser = async () => { @@ -25,7 +25,7 @@ const LoginScreen = () => { } await AsyncStorage.setItem("username", username); - route.push("index"); + router.push("index"); }; return ( diff --git a/package-lock.json b/package-lock.json index a4482c1..6cb8aa4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,9 +13,10 @@ "@react-navigation/native": "^6.1.7", "@react-navigation/stack": "^6.3.17", "expo": "~48.0.18", + "expo-constants": "~14.2.1", "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", @@ -8678,210 +8679,26 @@ } }, "node_modules/expo-constants": { - "version": "14.4.2", - "resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-14.4.2.tgz", - "integrity": "sha512-nOB122DOAjk+KrJT69lFQAoYVQGQjFHSigCPVBzVdko9S1xGsfiOH9+X5dygTsZTIlVLpQJDdmZ7ONiv3i+26w==", - "peer": true, + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-14.2.1.tgz", + "integrity": "sha512-DD5u4QmBds2U7uYo409apV7nX+XjudARcgqe7S9aRFJ/6kyftmuxvk1DpaU4X42Av8z/tfKwEpuxl+vl7HHx/Q==", "dependencies": { - "@expo/config": "~8.1.0", + "@expo/config": "~8.0.0", "uuid": "^3.3.2" }, "peerDependencies": { "expo": "*" } }, - "node_modules/expo-constants/node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "peer": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/expo-constants/node_modules/@expo/config": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@expo/config/-/config-8.1.2.tgz", - "integrity": "sha512-4e7hzPj50mQIlsrzOH6XZ36O094mPfPTIDIH4yv49bWNMc7GFLTofB/lcT+QyxiLaJuC0Wlk9yOLB8DIqmtwug==", - "peer": true, - "dependencies": { - "@babel/code-frame": "~7.10.4", - "@expo/config-plugins": "~7.2.0", - "@expo/config-types": "^49.0.0-alpha.1", - "@expo/json-file": "^8.2.37", - "getenv": "^1.0.0", - "glob": "7.1.6", - "require-from-string": "^2.0.2", - "resolve-from": "^5.0.0", - "semver": "7.5.3", - "slugify": "^1.3.4", - "sucrase": "^3.20.0" - } - }, - "node_modules/expo-constants/node_modules/@expo/config-plugins": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-7.2.5.tgz", - "integrity": "sha512-w+5ccu1IxBHgyQk9CPFKLZOk8yZQEyTjbJwOzESK1eR7QwosbcsLkN1c1WWUZYiCXwORu3UTwJYll4+X2xxJhQ==", - "peer": true, - "dependencies": { - "@expo/config-types": "^49.0.0-alpha.1", - "@expo/json-file": "~8.2.37", - "@expo/plist": "^0.0.20", - "@expo/sdk-runtime-versions": "^1.0.0", - "@react-native/normalize-color": "^2.0.0", - "chalk": "^4.1.2", - "debug": "^4.3.1", - "find-up": "~5.0.0", - "getenv": "^1.0.0", - "glob": "7.1.6", - "resolve-from": "^5.0.0", - "semver": "^7.5.3", - "slash": "^3.0.0", - "xcode": "^3.0.1", - "xml2js": "0.6.0" - } - }, - "node_modules/expo-constants/node_modules/@expo/config-types": { - "version": "49.0.0", - "resolved": "https://registry.npmjs.org/@expo/config-types/-/config-types-49.0.0.tgz", - "integrity": "sha512-8eyREVi+K2acnMBe/rTIu1dOfyR2+AMnTLHlut+YpMV9OZPdeKV0Bs9BxAewGqBA2slslbQ9N39IS2CuTKpXkA==", - "peer": true - }, - "node_modules/expo-constants/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/expo-constants/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "peer": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/expo-constants/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/expo-constants/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "peer": true - }, - "node_modules/expo-constants/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/expo-constants/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "peer": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/expo-constants/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "peer": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/expo-constants/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "peer": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/expo-constants/node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "peer": true, "bin": { "uuid": "bin/uuid" } }, - "node_modules/expo-constants/node_modules/xml2js": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.0.tgz", - "integrity": "sha512-eLTh0kA8uHceqesPqSE+VvO1CDDJWMwlQfB6LuN6T8w6MaDJ8Txm8P7s5cHD0miF0V+GGTZrDQfxPZQVsur33w==", - "peer": true, - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/expo-constants/node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "peer": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/expo-constants/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "peer": true - }, "node_modules/expo-file-system": { "version": "15.2.2", "resolved": "https://registry.npmjs.org/expo-file-system/-/expo-file-system-15.2.2.tgz", @@ -8933,27 +8750,6 @@ "url-parse": "^1.5.9" } }, - "node_modules/expo-linking/node_modules/expo-constants": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-14.2.1.tgz", - "integrity": "sha512-DD5u4QmBds2U7uYo409apV7nX+XjudARcgqe7S9aRFJ/6kyftmuxvk1DpaU4X42Av8z/tfKwEpuxl+vl7HHx/Q==", - "dependencies": { - "@expo/config": "~8.0.0", - "uuid": "^3.3.2" - }, - "peerDependencies": { - "expo": "*" - } - }, - "node_modules/expo-linking/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "bin": { - "uuid": "bin/uuid" - } - }, "node_modules/expo-modules-autolinking": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/expo-modules-autolinking/-/expo-modules-autolinking-1.2.0.tgz", @@ -9153,18 +8949,6 @@ "expo": "*" } }, - "node_modules/expo/node_modules/expo-constants": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/expo-constants/-/expo-constants-14.2.1.tgz", - "integrity": "sha512-DD5u4QmBds2U7uYo409apV7nX+XjudARcgqe7S9aRFJ/6kyftmuxvk1DpaU4X42Av8z/tfKwEpuxl+vl7HHx/Q==", - "dependencies": { - "@expo/config": "~8.0.0", - "uuid": "^3.3.2" - }, - "peerDependencies": { - "expo": "*" - } - }, "node_modules/expo/node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", diff --git a/package.json b/package.json index d9801be..ce0731c 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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",