Skip to content

Commit

Permalink
feat(): run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Dina Rocio Villanueva Quevedo authored and Dina Rocio Villanueva Quevedo committed Apr 23, 2024
1 parent a1d8418 commit 02da78d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 37 deletions.
26 changes: 10 additions & 16 deletions components/AcctRecipeBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,9 @@ const RecipeSummary = ({ image, name, savedOn }) => {
<Caption style={{ color: '#7C7C7C' }}>Saved on {savedOn}</Caption>
</View>
</View>
<View style={{...styles.rowContainer, gap:40}}>
<View style={styles.tagBox}>
<BodySmall style={{ color: '#fff' }}>Generic Recipe</BodySmall>
<MaterialCommunityIcons name='pot-steam' color='#fff' size={18} />
</View>

<Button kind='ghost' size='small' style={{ padding: 0 }}>
<FontAwesome name='trash-o' color='#000' size={18} />
</Button>
<BodySmall style={{ color: '#fff' }}>Generic Recipe</BodySmall>
</View>
</View>
</View>
Expand All @@ -65,8 +59,8 @@ const RecipeSummary = ({ image, name, savedOn }) => {

const AcctRecipeBar = (props) => {
const [savedRecipes, setSavedRecipes] = useState([]);
const [loading, setLoading] = useState(true);
const userId = '1';
const [loading, setLoading] = useState(true);
const userId = '1';

useEffect(() => {
const fetchSavedRecipes = async () => {
Expand All @@ -91,14 +85,14 @@ const AcctRecipeBar = (props) => {
if (loading) {
return (
<View style={styles.loaderContainer}>
<ActivityIndicator size="large" color="#52B175" />
<ActivityIndicator size='large' color='#52B175' />
</View>
);
}
if (!savedRecipes.length && !loading) {
return (
<View style={styles.loaderContainer}>
<Caption style={{textAlign:'center'}}>
<Caption style={{ textAlign: 'center' }}>
You have no saved recipes. Save recipes to view them here.
</Caption>
</View>
Expand All @@ -109,11 +103,11 @@ const AcctRecipeBar = (props) => {
<View style={{ backgroundColor: '#fff', padding: 20 }}>
<Title>Saved Recipes</Title>
{savedRecipes.map((recipe) => (
<View style={{ ...styles.columnContainer, width: '100%' }} key={recipe.recipe_id}>
<RecipeSummary
name={recipe.name}
savedOn={recipe.date_for}
/>
<View
style={{ ...styles.columnContainer, width: '100%' }}
key={recipe.recipe_id}
>
<RecipeSummary name={recipe.name} savedOn={recipe.date_for} />
</View>
))}
</View>
Expand Down
2 changes: 1 addition & 1 deletion containers/DietaryFilters.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { StyleSheet, View } from 'react-native';
import { CheckBox } from '@rneui/themed';
import { Body, Title } from '../components/Typography';
import { Body, Title } from '../components/Typography';

export default function DietaryFilters() {
const [categories, setCategories] = useState([
Expand Down
6 changes: 3 additions & 3 deletions screens/AccountDetailsScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const AccountDetailsScreen = () => {
onPress={handleSave}
style={[styles.buttonReset, styles.buttonPrimary]}
>
<ButtonText style={{color:'#fff'}}>Save</ButtonText>
<ButtonText style={{ color: '#fff' }}>Save</ButtonText>
</TouchableOpacity>
<TouchableOpacity
onPress={handleDelete}
Expand Down Expand Up @@ -103,15 +103,15 @@ const styles = StyleSheet.create({
borderRadius: 9,
fontSize: 16,
color: '#727272',
fontFamily: 'Gilroy-Regular'
fontFamily: 'Gilroy-Regular',
},
textBoxEditing: {
backgroundColor: '#F1F9F4',
color: '#121212',
paddingVertical: 12,
paddingHorizontal: 8,
fontSize: 16,
fontFamily: 'Gilroy-Regular'
fontFamily: 'Gilroy-Regular',
},
editSection: {
gap: 20,
Expand Down
34 changes: 17 additions & 17 deletions screens/DietaryAllergenFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,23 @@ export const DietaryAllergenFilterScreen = () => {
<View style={{ flex: 1 }}>
<ScrollView>
<View style={styles.homeContainer}>
<Text style={styles.title}>Dietary Requirements</Text>
<Text style={styles.title}>Dietary Requirements</Text>

{categories.map((item, index) => {
return (
<CheckBox
// Use ThemeProvider to change the defaults of the checkbox
checkedColor='#52B175'
backgroundColor='#f0f0f0'
title={item.preference_name}
checked={item.isCheck || false}
onPress={() => onValueChange(item, index)}
key={item.key}
name={item.name}
id={item.id}
/>
);
})}
{categories.map((item, index) => {
return (
<CheckBox
// Use ThemeProvider to change the defaults of the checkbox
checkedColor='#52B175'
backgroundColor='#f0f0f0'
title={item.preference_name}
checked={item.isCheck || false}
onPress={() => onValueChange(item, index)}
key={item.key}
name={item.name}
id={item.id}
/>
);
})}

<View style={styles.buttonContainer}>
<CategoryButton title='Save' onPress={() => handleSave()} />
Expand All @@ -146,7 +146,7 @@ export const DietaryAllergenFilterScreen = () => {
const styles = StyleSheet.create({
homeContainer: {
padding: 40,
paddingTop:0,
paddingTop: 0,
marginBottom: 50,
},
buttonContainer: {
Expand Down

0 comments on commit 02da78d

Please sign in to comment.