Skip to content

Commit

Permalink
eslint cleanup pt1
Browse files Browse the repository at this point in the history
  • Loading branch information
ricokareem committed Feb 28, 2021
1 parent 161a7f8 commit ed9c440
Show file tree
Hide file tree
Showing 23 changed files with 585 additions and 831 deletions.
118 changes: 70 additions & 48 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
import * as React from 'react';
import { Platform, StatusBar, StyleSheet, View } from 'react-native';
/* eslint-disable global-require */

import * as React from "react";
import { Platform, StatusBar, StyleSheet, View } from "react-native";
// import { SplashScreen } from 'expo';
import * as Font from 'expo-font';
import { Ionicons } from '@expo/vector-icons';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
// import * as SplashScreen from 'expo-splash-screen';
import * as Font from "expo-font";
import { Ionicons } from "@expo/vector-icons";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";

import BottomTabNavigator from "./navigation/BottomTabNavigator";
import useLinking from "./navigation/useLinking";

import BottomTabNavigator from './navigation/BottomTabNavigator';
import useLinking from './navigation/useLinking';
import CardMedia from "./screens/CardMedia";
import ReferenceGuideMedia from "./screens/ReferenceGuideMedia";
import HowToUseAppScreen from "./screens/HowToUseAppScreen";
import BeginningHealingSessionScreen from "./screens/BeginningHealingSessionScreen";
import AboutHealingTechniques from "./screens/AboutHealingTechniques";
import AboutRoland from "./screens/AboutRoland";
import Disclaimer from "./screens/Disclaimer";
import Social from "./screens/Social";
import Credits from "./screens/Credits";

import CardMedia from './screens/CardMedia';
import ReferenceGuideMedia from './screens/ReferenceGuideMedia';
import HowToUseAppScreen from './screens/HowToUseAppScreen';
import BeginningHealingSessionScreen from './screens/BeginningHealingSessionScreen';
import AboutHealingTechniques from './screens/AboutHealingTechniques';
import AboutRoland from './screens/AboutRoland';
import Disclaimer from './screens/Disclaimer';
import Social from './screens/Social';
import Credits from './screens/Credits';
type AppProps = {
skipLoadingScreen: any;
};

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
},
});

const Stack = createStackNavigator();

const App = (props) => {
const App = (props: AppProps) => {
const { skipLoadingScreen } = props;
const [isLoadingComplete, setLoadingComplete] = React.useState(false);
const [initialNavigationState, setInitialNavigationState] = React.useState();
const containerRef = React.useRef();
Expand All @@ -39,7 +54,7 @@ const App = (props) => {
// Load fonts
await Font.loadAsync({
...Ionicons.font,
'space-mono': require('./assets/fonts/SpaceMono-Regular.ttf'),
"space-mono": require("./assets/fonts/SpaceMono-Regular.ttf"),
});
} catch (e) {
// We might want to provide this error information to an error reporting service
Expand All @@ -53,36 +68,43 @@ const App = (props) => {
loadResourcesAndDataAsync();
}, []);

if (!isLoadingComplete && !props.skipLoadingScreen) {
if (!isLoadingComplete && !skipLoadingScreen) {
return null;
} else {
return (
<View style={styles.container}>
{Platform.OS === 'ios' && <StatusBar barStyle="default" />}
<NavigationContainer ref={containerRef} initialState={initialNavigationState}>
<Stack.Navigator>
<Stack.Screen name="Root" component={BottomTabNavigator} />
<Stack.Screen name="CardMedia" component={CardMedia} />
<Stack.Screen name="ReferenceGuideMedia" component={ReferenceGuideMedia} />
<Stack.Screen name="HowToUseAppScreen" component={HowToUseAppScreen} />
<Stack.Screen name="BeginningHealingSessionScreen" component={BeginningHealingSessionScreen} />
<Stack.Screen name="AboutHealingTechniques" component={AboutHealingTechniques} />
<Stack.Screen name="AboutRoland" component={AboutRoland} />
<Stack.Screen name="Disclaimer" component={Disclaimer} />
<Stack.Screen name="Social" component={Social} />
<Stack.Screen name="Credits" component={Credits} />
</Stack.Navigator>
</NavigationContainer>
</View>
);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
},
});
return (
<View style={styles.container}>
{Platform.OS === "ios" && <StatusBar barStyle="default" />}
<NavigationContainer
ref={containerRef}
initialState={initialNavigationState}
>
<Stack.Navigator>
<Stack.Screen name="Root" component={BottomTabNavigator} />
<Stack.Screen name="CardMedia" component={CardMedia} />
<Stack.Screen
name="ReferenceGuideMedia"
component={ReferenceGuideMedia}
/>
<Stack.Screen
name="HowToUseAppScreen"
component={HowToUseAppScreen}
/>
<Stack.Screen
name="BeginningHealingSessionScreen"
component={BeginningHealingSessionScreen}
/>
<Stack.Screen
name="AboutHealingTechniques"
component={AboutHealingTechniques}
/>
<Stack.Screen name="AboutRoland" component={AboutRoland} />
<Stack.Screen name="Disclaimer" component={Disclaimer} />
<Stack.Screen name="Social" component={Social} />
<Stack.Screen name="Credits" component={Credits} />
</Stack.Navigator>
</NavigationContainer>
</View>
);
};

export default App;
45 changes: 20 additions & 25 deletions components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
import React from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
import React from "react";
import { StyleSheet, Text, View } from "react-native";

// import { NavigationActions } from 'react-navigation';

// import { Icon } from 'expo';

function Header (props) {
const styles = StyleSheet.create({
header: {
display: "flex",
flexDirection: "row",
justifyContent: "flex-start",
alignItems: "flex-start",
paddingLeft: 15,
paddingTop: 60,
paddingBottom: 15,
backgroundColor: "#fff",
},
starLogo: {
fontWeight: "bold",
fontSize: 24,
color: "#fb8400",
},
});

function Header(props) {
// const backAction = NavigationActions.back();

// props.navigation.dispatch(backAction);
Expand All @@ -22,22 +35,4 @@ function Header (props) {
);
}

const styles = StyleSheet.create({
header: {
display: 'flex',
flexDirection: 'row',
justifyContent: 'flex-start',
alignItems: 'flex-start',
paddingLeft: 15,
paddingTop: 60,
paddingBottom: 15,
backgroundColor: '#fff'
},
starLogo: {
fontWeight: 'bold',
fontSize: 24,
color: '#fb8400'
}
});

export default Header;
6 changes: 0 additions & 6 deletions components/StyledText.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions components/TabBarIcon.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions components/__tests__/StyledText.test.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions components/__tests__/__snapshots__/StyledText.test.tsx.snap

This file was deleted.

71 changes: 0 additions & 71 deletions navigation/BottomTabNavigator.js

This file was deleted.

Loading

0 comments on commit ed9c440

Please sign in to comment.