From c65270a79de1d4d570d805fedd16ef7a7a151ba2 Mon Sep 17 00:00:00 2001 From: Justin Shillingford Date: Mon, 29 Jun 2020 14:26:50 -0400 Subject: Removed App.tsx and sign_in_logo.png --- App.tsx | 240 -------------------------------------------- src/assets/sign_in_logo.png | Bin 28865 -> 0 bytes 2 files changed, 240 deletions(-) delete mode 100644 App.tsx delete mode 100644 src/assets/sign_in_logo.png diff --git a/App.tsx b/App.tsx deleted file mode 100644 index a5fd3040..00000000 --- a/App.tsx +++ /dev/null @@ -1,240 +0,0 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - * - * Generated with the TypeScript template - * https://github.com/react-native-community/react-native-template-typescript - * - * @format - */ - -import React, { useRef } from 'react'; -import { - SafeAreaView, - StyleSheet, - ScrollView, - View, - Text, - StatusBar, - Image, - TextInput, - Button, - Alert, - TouchableOpacity, -} from 'react-native'; - -import { - Header, - LearnMoreLinks, - Colors, - DebugInstructions, - ReloadInstructions, -} from 'react-native/Libraries/NewAppScreen'; - -import LinearGradient from 'react-native-linear-gradient'; - -declare const global: {HermesInternal: null | {}}; - -const App = () => { - - const passwordInput = useRef(); - const [data, setData] = React.useState({ - username: '', - password: '', - isValidUser: true, - isValidPassword: true, - }) - - /* - Updates the state of username. Also verifies the input of the Username field. - */ - const handleUsernameUpdate = (val:string) => { - var validLength:boolean = val.trim().length >= 6 - - if (validLength) { - setData({ - ...data, - username: val, - isValidUser: true - }) - } - else { - setData({ - ...data, - username: val, - isValidUser: false - }) - } - } - - /* - Updates the state of password. Also verifies the input of the Password field. - */ - const handlePasswordUpdate = (val:string) => { - var validLength:boolean = val.trim().length >= 8 - - if (validLength) { - setData({ - ...data, - password: val, - isValidPassword: true - }) - } - else { - setData({ - ...data, - password: val, - isValidPassword: false - }) - } - } - - /* - Handler for the Let's Start button or the Go button on the keyboard. - */ - const handleLogin = () => { - if (data.isValidUser && data.isValidPassword) { - Alert.alert(`My favorite Girl Scout Cookies are taggalongs! What are yours ${data.username}?`) - } - } - - return ( - <> - - - - - handleUsernameUpdate(user)} - defaultValue={data.username} - onSubmitEditing={() => {passwordInput.current.focus()}} - blurOnSubmit={false} - /> - { data.isValidUser ? null : - Username must be at least 6 characters long. - } - handlePasswordUpdate(pass)} - defaultValue={data.password} - onSubmitEditing={() => handleLogin()} - ref={passwordInput} - secureTextEntry={true} - /> - { data.isValidPassword ? null : - Password must be at least 8 characters long. - } - Alert.alert("tagg! You're it!")}> - Forgot password - - handleLogin()}> - Let's Start! - - - New to tagg? Alert.alert("I get the tagg flip it and tumble it.")}>Get started! - - - - - ); -}; - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: 'transparent', - }, - linearGradient: { - flex: 1, - alignItems: 'center', - }, - logo: { - top: 165, - width: 215, - height: 149, - }, - credentials: { - top: 190, - width: 248, - height: 40, - fontSize: 20, - color: '#FFFFFF', - borderColor: '#FFFDFD', - borderWidth: 2, - borderRadius: 20, - paddingLeft: 13, - marginVertical: 15, - }, - forgotPassword: { - top: 190, - left: -60, - }, - forgotPasswordText: { - fontSize: 15, - color: '#FFFFFF', - textDecorationLine: 'underline', - }, - start: { - top: 195, - width: 144, - height: 36, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#FFFFFF', - borderRadius: 20, - marginTop: 15 - }, - startText: { - fontSize: 15, - color: '#78A0EF', - fontWeight: 'bold', - }, - getStarted: { - color: '#FFFFFF', - textDecorationLine: 'underline' - }, - newUser: { - top: 240, - color: '#F4DDFF', - }, - invalidCredentials: { - top: 180, - color: '#F4DDFF' - } -}); - -export default App; diff --git a/src/assets/sign_in_logo.png b/src/assets/sign_in_logo.png deleted file mode 100644 index 27e43268..00000000 Binary files a/src/assets/sign_in_logo.png and /dev/null differ -- cgit v1.2.3-70-g09d2