-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated directory, tree search & filter
- Loading branch information
1 parent
1da5097
commit 2568a0d
Showing
11 changed files
with
479 additions
and
89 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import React, { useState } from 'react'; | ||
import { Modal, Text, TouchableOpacity, View } from 'react-native'; | ||
import CheckBox from '@react-native-community/checkbox'; | ||
import { styles } from '../screens/TreeSearch/styles'; | ||
|
||
type TreeFilterModalProps = { | ||
visible: boolean; | ||
onClose: () => void; | ||
}; | ||
|
||
// type SelectedHeightFilters = { | ||
// [key: string]: boolean; | ||
// }; | ||
|
||
const TreeFilterModal: React.FC<TreeFilterModalProps> = ({ | ||
visible, | ||
onClose, | ||
}) => { | ||
// const [selectedHeightFilters, setSelectedHeightFilters] = useState<SelectedHeightFilters>({ | ||
// small: false, | ||
// medium: false, | ||
// large: false, | ||
// }); | ||
|
||
// const handleCheckboxChange = (filter: string) => { | ||
// setSelectedHeightFilters(prevState => ({ | ||
// ...prevState, | ||
// [filter]: !prevState[filter], | ||
// })); | ||
// }; | ||
|
||
return ( | ||
<Modal | ||
animationType="slide" | ||
transparent={true} | ||
visible={visible} | ||
onRequestClose={onClose} | ||
> | ||
<View style={styles.filterContainer}> | ||
<View style={styles.filterContent}> | ||
<View style={styles.filterHeading}> | ||
<Text style={styles.filterHeadingText}>Filter</Text> | ||
</View> | ||
|
||
{/* <View style={styles.checkboxContainer}> | ||
<View style={styles.checkboxRow}> | ||
<CheckBox | ||
value={selectedHeightFilters.small} | ||
onValueChange={() => handleCheckboxChange('small')} | ||
/> | ||
<Text style={styles.checkboxLabel}>Small(< 40’) </Text> | ||
</View> | ||
<View style={styles.checkboxRow}> | ||
<CheckBox | ||
value={selectedHeightFilters.medium} | ||
onValueChange={() => handleCheckboxChange('medium')} | ||
/> | ||
<Text style={styles.checkboxLabel}>Medium (40 - 60’)</Text> | ||
</View> | ||
<View style={styles.checkboxRow}> | ||
<CheckBox | ||
value={selectedHeightFilters.Large} | ||
onValueChange={() => handleCheckboxChange('large')} | ||
/> | ||
<Text style={styles.checkboxLabel}>Large(60’ +) </Text> | ||
</View> */} | ||
|
||
<TouchableOpacity style={styles.completeButton} onPress={onClose}> | ||
<Text style={styles.completeButtonText}>Complete</Text> | ||
</TouchableOpacity> | ||
</View> | ||
</View> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default TreeFilterModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,78 @@ import { styles } from './styles'; | |
type DirectoryProps = NativeStackScreenProps<RootStackParamList, 'Directory'>; | ||
|
||
export default function Directory({ navigation }: DirectoryProps) { | ||
const handleGoBack = () => { | ||
navigation.navigate('Contact'); | ||
}; | ||
|
||
return ( | ||
<View style={styles.backgroundContainer}> | ||
<TouchableOpacity | ||
style={styles.backButton} | ||
onPress={() => navigation.goBack()} | ||
> | ||
<ScrollView style={styles.directoryContainer}> | ||
<TouchableOpacity style={styles.backButton} onPress={handleGoBack}> | ||
<BackArrow style={styles.backIcon} /> | ||
</TouchableOpacity> | ||
<View> | ||
<View></View> | ||
|
||
<View style={styles.directoryHeader}> | ||
<Call style={styles.callIcon} /> | ||
<Text style={styles.contactHeading}>Directory</Text> | ||
</View> | ||
|
||
<View style={styles.directoryContent}> | ||
<View style={styles.directoryDetailsContainer}> | ||
<Text style={styles.directoryHeading}>Nursery</Text> | ||
<Text style={styles.directorySubHeading}> | ||
For inventory and availability | ||
</Text> | ||
<Text style={styles.directoryTextLight}>408-123-2345 Ext: 123</Text> | ||
<Text style={styles.directoryTextLight}> | ||
[email protected] | ||
</Text> | ||
</View> | ||
|
||
<View style={styles.directoryDetailsContainer}> | ||
<Text style={styles.directoryHeading}>Planting</Text> | ||
<Text style={styles.directorySubHeading}> | ||
For delivery and planting status{' '} | ||
</Text> | ||
</View> | ||
|
||
<View style={styles.directoryDetailsContainer}> | ||
<Text style={styles.directoryTextBold}>San Jose</Text> | ||
<Text style={styles.directoryTextLight}>408-123-2345 Ext: 123</Text> | ||
<Text style={styles.directoryTextLight}> | ||
[email protected]{' '} | ||
</Text> | ||
</View> | ||
|
||
<View style={styles.directoryDetailsContainer}> | ||
<Text style={styles.directoryTextBold}> | ||
Campbell, Morgan Hill, Saratoga, Gilroy | ||
</Text> | ||
<Text style={styles.directoryTextLight}>408-123-2345 Ext: 123</Text> | ||
<Text style={styles.directoryTextLight}> | ||
[email protected]{' '} | ||
</Text> | ||
</View> | ||
|
||
<View style={styles.directoryDetailsContainer}> | ||
<Text style={styles.directoryHeading}>Tree Care</Text> | ||
<Text style={styles.directorySubHeading}> | ||
Inquiries of already-planted trees | ||
</Text> | ||
<Text style={styles.directoryTextLight}>408-123-2345 Ext: 123</Text> | ||
<Text style={styles.directoryTextLight}> | ||
[email protected]{' '} | ||
</Text> | ||
</View> | ||
|
||
<View style={styles.directoryDetailsContainer}> | ||
<Text style={styles.directoryHeading}>Lawn Busters</Text> | ||
<Text style={styles.directorySubHeading}>Lawn conversions</Text> | ||
<Text style={styles.directoryTextLight}>408-123-2345 Ext: 123</Text> | ||
<Text style={styles.directoryTextLight}> | ||
[email protected]{' '} | ||
</Text> | ||
</View> | ||
</View> | ||
</View> | ||
</ScrollView> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.