Skip to content

Commit

Permalink
Removed unnecessary imports from all files
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandotfurrer committed Apr 22, 2024
1 parent 2eea3a6 commit e16cf8b
Show file tree
Hide file tree
Showing 48 changed files with 118 additions and 13,824 deletions.
5 changes: 0 additions & 5 deletions components/Accordion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@ import React, { useState } from 'react';
import { View, TouchableOpacity, StyleSheet, StatusBar } from 'react-native';
import { AntDesign } from '@expo/vector-icons';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

const Accordion = ({
Expand Down
4 changes: 1 addition & 3 deletions components/AccountSettings.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { View, StyleSheet, Image, Pressable } from 'react-native';
import { View, StyleSheet } from 'react-native';
import { useNavigation } from '@react-navigation/native';
import AcctHeader from './AcctHeader';
import Nav from './Nav';
import Button from './Button';
import { MaterialIcons } from '@expo/vector-icons';
import {
Expand Down
8 changes: 0 additions & 8 deletions components/AcctHeader.jsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
import {
StyleSheet,
Text,
View,
Image,
TouchableOpacity,
Pressable,
} from 'react-native';
import React from 'react';
import { EvilIcons } from '@expo/vector-icons';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

const AcctHeader = () => {
Expand Down
7 changes: 1 addition & 6 deletions components/AcctRecipeBar.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import { StyleSheet, Text, View, Image, TouchableOpacity } from 'react-native';
import { StyleSheet, View, Image, TouchableOpacity } from 'react-native';
import React from 'react';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

export default AcctRecipeBar = (props) => {
const {
onPress,
image = 'https://iambaker.net/wp-content/uploads/2020/03/sourdough-bread-4-768x644.jpg',
name = 'A Simple Sourdough Starter Recipe',
numMinutes = '1440',
Expand Down
9 changes: 2 additions & 7 deletions components/AddItemBar.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import React, { useEffect, useState } from 'react';
import { StyleSheet, Text, View, Image, Pressable } from 'react-native';
import React, { useState } from 'react';
import { StyleSheet, View, Image, Pressable } from 'react-native';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

const AddItemBar = () => {
Expand Down
5 changes: 1 addition & 4 deletions components/AddProductCard.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import React from 'react';
import { StyleSheet, Text, View, Image, Pressable } from 'react-native';
import { StyleSheet, View, Image, Pressable } from 'react-native';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

export default AddProductCard = (props) => {
Expand Down
7 changes: 1 addition & 6 deletions components/AddRecipeBar.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import { StyleSheet, Text, View, Image } from 'react-native';
import { StyleSheet, View, Image } from 'react-native';
import React from 'react';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

export default AddRecipeBar = (props) => {
const {
onPress,
image = 'https://iambaker.net/wp-content/uploads/2020/03/sourdough-bread-4-768x644.jpg',
name = 'A Simple Sourdough Starter Recipe',
numMinutes = '1440',
Expand Down
6 changes: 0 additions & 6 deletions components/Button/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ import React from 'react';
import { ButtonContainer, Enhancer } from './styles';
import { ActivityIndicator, View } from 'react-native';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from '../Typography';

const Button = ({
Expand Down
11 changes: 1 addition & 10 deletions components/Button/styles.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// import styled, { css } from 'styled-components/native';

export const ButtonContainer = styled.Pressable`
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -52,11 +50,4 @@ export const ButtonText = styled.Text`
}
}};
font-size: ${(props) => props.fontSize || '16px'};
`;

// export const Enhancer = styled.Text`
// color: ${(props) => props.color || '#ffffff'};
// background-color: ${(props) => props.secondaryColor || '#FFFFFF26'};
// padding: 2px 5px;
// border-radius: 4px;
// `;
`;
7 changes: 1 addition & 6 deletions components/CategoryButton.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { StyleSheet, Text, TouchableOpacity } from 'react-native';
import { StyleSheet, TouchableOpacity } from 'react-native';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

const CategoryButton = ({ title, onPress }) => {
Expand Down
6 changes: 0 additions & 6 deletions components/CategoryCard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ import { Image } from 'react-native';
import styled, { css } from 'styled-components/native';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from '../Typography';

const colorMappings = {
Expand Down
11 changes: 1 addition & 10 deletions components/Checkbox.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import React, { useState } from 'react';
import React from 'react';
import { CheckBox } from '@rneui/themed';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

const Checkbox = ({ label, isChecked }) => {
return (
Expand Down
8 changes: 0 additions & 8 deletions components/DietFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@ import { useState } from 'react';
import {
FlatList,
StyleSheet,
Text,
TouchableOpacity,
View,
Pressable,
} from 'react-native';
import { SPOONACULAR_API_KEY } from '@env';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

const DietFilter = () => {
Expand Down
4 changes: 2 additions & 2 deletions components/FavoriteRecipes.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useContext, useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import { Pressable, StyleSheet, Text, View } from 'react-native';
import RecipeCard from './RecipeCard';
import { FlatList } from 'react-native';
import { useNavigation } from '@react-navigation/native';

const FavoriteRecipesList = ({ title, scrollEnabled, numberOfRecipes }) => {
const FavoriteRecipesList = ({ scrollEnabled }) => {
const [recipes, setRecipes] = useState([]);
const navigation = useNavigation();
const { userId } = '8950a7c8-20c3-4d77-9a10-3622e07fd3dd';
Expand Down
8 changes: 1 addition & 7 deletions components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import { StyleSheet, Text, View } from 'react-native';
import { StyleSheet, View } from 'react-native';
import React from 'react';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

// Uses the pageTitle prop so it can be changed dynamically per page where called.
Expand Down
9 changes: 0 additions & 9 deletions components/Hero.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import { Image, StyleSheet, View, Dimensions } from 'react-native';
import HeroBanner from '../assets/hero.png';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from '../Typography';

const Hero = ({ image }) => {
const screenWidth = Dimensions.get('window').width;
Expand Down
4 changes: 2 additions & 2 deletions components/IngredientCard.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StyleSheet, Text, View, Image, Pressable } from 'react-native';
import { StyleSheet, View, Image } from 'react-native';
import React from 'react';
import { Body, ButtonLarge, HeaderTitle } from './Typography';
import { ButtonLarge } from './Typography';

export default IngredientCard = ({ ingredient }) => {
const { id, name, image } = ingredient;
Expand Down
7 changes: 1 addition & 6 deletions components/Macro.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { View } from 'react-native';
import { AnimatedCircularProgress } from 'react-native-circular-progress';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

const Macro = ({ macro, percentage, goal }) => {
Expand Down
7 changes: 1 addition & 6 deletions components/Modal/index.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
import React, { useState } from 'react';
import React from 'react';
import {
Alert,
Modal as ModalBase,
StyleSheet,
Text,
Pressable,
View,
KeyboardAvoidingView,
Platform,
} from 'react-native';
import { Body, Title } from '../Typography';
import { AntDesign } from '@expo/vector-icons';
import Button from '../Button';

export const Modal = ({
modalVisible,
setModalVisible,
titleText,
descriptionText,
onClose,
size,
fullscreen,
children,
Expand Down
6 changes: 0 additions & 6 deletions components/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ import { FontAwesome5 } from '@expo/vector-icons';
import { useNavigation } from '@react-navigation/native';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

const Nav = () => {
Expand Down
8 changes: 1 addition & 7 deletions components/RadioButton.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import React from 'react';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { StyleSheet, TouchableOpacity, View } from 'react-native';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

const RadioButton = ({
Expand Down
7 changes: 1 addition & 6 deletions components/RecipeCard.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { Image, StyleSheet, Text, View } from 'react-native';
import { Image, StyleSheet, View } from 'react-native';
import { Entypo } from '@expo/vector-icons';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

const RecipeCard = ({ title, image, minutes, rating }) => {
Expand Down Expand Up @@ -58,12 +55,10 @@ const styles = StyleSheet.create({
cardDetails: {
flexDirection: 'row',
alignItems: 'center',
// gap: 3,
},
ratingDetails: {
flexDirection: 'row',
alignItems: 'center',
// gap: 1,
},
cardTitle: {
maxWidth: 150,
Expand Down
8 changes: 1 addition & 7 deletions components/RecipeList.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import React, { useContext, useEffect, useState } from 'react';
import { Pressable, StyleSheet, Text, View } from 'react-native';
import { Pressable, StyleSheet, View } from 'react-native';
import RecipeCard from './RecipeCard';
import { FlatList } from 'react-native';
import { useNavigation } from '@react-navigation/native';
import AuthContext from '../auth/auth-context';
import {
Title,
Body,
BodySmall,
Caption,
ButtonLarge,
ButtonText,
ButtonSmall,
} from './Typography';

const RecipeList = ({ title, scrollEnabled, numberOfRecipes }) => {
Expand Down
Loading

0 comments on commit e16cf8b

Please sign in to comment.