From 5180a6baf893c33130846adeb19cf958bfcce382 Mon Sep 17 00:00:00 2001 From: Tim Glasgow Date: Mon, 1 Aug 2022 21:38:37 -0500 Subject: [PATCH] Splash screen --- squarenotsquare/src/screens/Splash.js | 53 ++++++--------------------- 1 file changed, 12 insertions(+), 41 deletions(-) diff --git a/squarenotsquare/src/screens/Splash.js b/squarenotsquare/src/screens/Splash.js index 53113a9..d84906a 100644 --- a/squarenotsquare/src/screens/Splash.js +++ b/squarenotsquare/src/screens/Splash.js @@ -1,51 +1,22 @@ import React from "react"; -import { Animated, Easing, Text, View } from "react-native"; +import { Image, Platform, Text, View } from "react-native"; import { useEffect, useState } from "react"; import { styles } from './styles/AppStyles'; -import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons'; -import Icons from '../themes/Icons'; -import Colors from "../themes/Colors"; -import Metrics from "../themes/Metrics"; -const spinValue = new Animated.Value(0); function Splash(props){ + let splashLogo = null; - useEffect(() => { - Animated.loop( - Animated.timing(spinValue, { - toValue: 1, - duration: 3000, - easing: Easing.linear, - useNativeDriver: true, - })).start(); - }, []); - - const spin = spinValue.interpolate({ - inputRange: [0, 1], - outputRange: ['0deg', '360deg'], - }); - + if (Platform.OS === 'android') { + splashLogo = {uri: 'asset:/squarelogo.png'}; + } else { + splashLogo = {url: 'squarelogo'} + } return ( - - - - Square Not Square - - - - - Loading... - - - - - - - + + ); }