From 8f44885fd353fa14d0600220da02a0a82ed6b28d Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Sun, 7 Aug 2022 12:42:11 +0200 Subject: [PATCH] Front: Add Basic authentication view --- front/views/AuthenticationView.tsx | 21 +++++++++++++++++++++ front/views/HomeView.tsx | 23 +++++++---------------- 2 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 front/views/AuthenticationView.tsx diff --git a/front/views/AuthenticationView.tsx b/front/views/AuthenticationView.tsx new file mode 100644 index 0000000..31b43f5 --- /dev/null +++ b/front/views/AuthenticationView.tsx @@ -0,0 +1,21 @@ +import React from "react"; +import { Text, View } from 'react-native'; +import { Button } from "react-native-paper"; +import { useDispatch } from "react-redux"; +import { setUserToken } from "../state/UserSlice"; + +const AuthenticationView = () => { + const dispatch = useDispatch(); + return ( + + Welcom to Chromacase + This is the Authentication Screen + + + ); +} + + +export default AuthenticationView; diff --git a/front/views/HomeView.tsx b/front/views/HomeView.tsx index 3244f73..e11fec5 100644 --- a/front/views/HomeView.tsx +++ b/front/views/HomeView.tsx @@ -1,26 +1,17 @@ import React from "react"; -import { Text, View, ColorValue } from 'react-native'; -import { useTheme } from "react-native-paper"; - -const ExampleBox = (props: { textColor: ColorValue, backgroundColor: ColorValue }) => ( - - Hello - -) +import { Text, View } from 'react-native'; +import { Button } from "react-native-paper"; +import { useDispatch } from "react-redux"; +import { unsetUserToken } from "../state/UserSlice"; const HomeView = () => { - const { colors } = useTheme(); + const dispatch = useDispatch(); return ( - - - - - - + This is the Home Screen + ); } - export default HomeView;