From 651e8e263308ff96f4c2c8bb1f961b61b84d3d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Mon, 20 May 2024 15:05:34 +0200 Subject: [PATCH] feat: add about page --- app/application/_layout.tsx | 2 +- app/application/users/settings.tsx | 36 +++----- app/authentication/_layout.tsx | 9 ++ app/authentication/about.tsx | 26 ++++++ app/authentication/login.tsx | 1 + app/authentication/register.tsx | 1 + app/index.tsx | 2 +- .../assets/images/Universite-Strasbourg.png | Bin 10812 -> 0 bytes .../react-native/components/About.tsx | 81 ++++++++++++++++++ utils/__tests__/version.test.ts | 39 +++++++++ utils/version.ts | 8 ++ 11 files changed, 181 insertions(+), 24 deletions(-) create mode 100644 app/authentication/about.tsx delete mode 100644 presentation/assets/images/Universite-Strasbourg.png create mode 100644 presentation/react-native/components/About.tsx create mode 100644 utils/__tests__/version.test.ts create mode 100644 utils/version.ts diff --git a/app/application/_layout.tsx b/app/application/_layout.tsx index 25796d7..67cad6f 100644 --- a/app/application/_layout.tsx +++ b/app/application/_layout.tsx @@ -8,7 +8,7 @@ const TabLayout: React.FC = () => { const { user } = useAuthentication() if (user == null) { - return + return } return ( diff --git a/app/application/users/settings.tsx b/app/application/users/settings.tsx index 1a4b9f9..414f11a 100644 --- a/app/application/users/settings.tsx +++ b/app/application/users/settings.tsx @@ -1,7 +1,6 @@ -import { Text } from "react-native" import { Button } from "react-native-paper" -import { SafeAreaView } from "react-native-safe-area-context" +import { About } from "@/presentation/react-native/components/About" import { useAuthentication } from "@/presentation/react/contexts/Authentication" const SettingsPage: React.FC = () => { @@ -12,26 +11,19 @@ const SettingsPage: React.FC = () => { } return ( - - Settings - - - + + Logout + + } + /> ) } diff --git a/app/authentication/_layout.tsx b/app/authentication/_layout.tsx index 4302423..b8325bc 100644 --- a/app/authentication/_layout.tsx +++ b/app/authentication/_layout.tsx @@ -17,6 +17,15 @@ const TabLayout: React.FC = () => { headerShown: false, }} > + { + return + }, + }} + /> { + const router = useRouter() + + return ( + { + router.push("/authentication/login") + }} + > + Get Started 🚀 + + } + /> + ) +} + +export default AboutPage diff --git a/app/authentication/login.tsx b/app/authentication/login.tsx index d6fea8c..944c828 100644 --- a/app/authentication/login.tsx +++ b/app/authentication/login.tsx @@ -67,6 +67,7 @@ const LoginPage: React.FC = () => {