From 711fe8e0060773cf66eb0987dbd833b0dd2440fa Mon Sep 17 00:00:00 2001 From: katyhonguyen Date: Mon, 2 Dec 2024 14:39:01 -0800 Subject: [PATCH] fixed conflicts --- App.tsx | 14 ++-- src/components/searchBar.tsx | 2 +- src/icons/ArrowRight.tsx | 22 ++++++ src/icons/Back.tsx | 21 ++++++ src/icons/Call.tsx | 18 +++++ src/icons/CallBig.tsx | 18 +++++ src/icons/Facebook.tsx | 18 +++++ src/icons/Instagram.tsx | 18 +++++ src/icons/Location.tsx | 25 +++++++ src/icons/OcfLogo.tsx | 35 +++++++++ src/icons/Website.tsx | 26 +++++++ src/icons/X.tsx | 20 ++++++ src/icons/Youtube.tsx | 18 +++++ src/icons/index.ts | 11 +++ src/screens/Contact/Contact.tsx | 71 +++++++++++++++++++ src/screens/Contact/Directory.tsx | 9 +++ .../{ContactPage => Contact}/styles.ts | 13 +++- src/screens/ContactPage/contactPage.tsx | 43 ----------- .../TreeSearch.tsx} | 6 +- .../{SearchScreen => TreeSearch}/styles.ts | 0 src/svg/arrow-right.svg | 3 + src/svg/back.svg | 3 + src/svg/call-big.svg | 3 + src/svg/call.svg | 3 + src/svg/facebook.svg | 3 + src/svg/instagram.svg | 3 + src/svg/location.svg | 10 +++ src/svg/ocf-logo.svg | 9 +++ src/svg/website.svg | 7 ++ src/svg/x.svg | 3 + src/svg/youtube.svg | 3 + src/types/navigation.ts | 2 +- 32 files changed, 404 insertions(+), 56 deletions(-) create mode 100644 src/icons/ArrowRight.tsx create mode 100644 src/icons/Back.tsx create mode 100644 src/icons/Call.tsx create mode 100644 src/icons/CallBig.tsx create mode 100644 src/icons/Facebook.tsx create mode 100644 src/icons/Instagram.tsx create mode 100644 src/icons/Location.tsx create mode 100644 src/icons/OcfLogo.tsx create mode 100644 src/icons/Website.tsx create mode 100644 src/icons/X.tsx create mode 100644 src/icons/Youtube.tsx create mode 100644 src/icons/index.ts create mode 100644 src/screens/Contact/Contact.tsx create mode 100644 src/screens/Contact/Directory.tsx rename src/screens/{ContactPage => Contact}/styles.ts (87%) delete mode 100644 src/screens/ContactPage/contactPage.tsx rename src/screens/{SearchScreen/SearchScreen.tsx => TreeSearch/TreeSearch.tsx} (91%) rename src/screens/{SearchScreen => TreeSearch}/styles.ts (100%) create mode 100644 src/svg/arrow-right.svg create mode 100644 src/svg/back.svg create mode 100644 src/svg/call-big.svg create mode 100644 src/svg/call.svg create mode 100644 src/svg/facebook.svg create mode 100644 src/svg/instagram.svg create mode 100644 src/svg/location.svg create mode 100644 src/svg/ocf-logo.svg create mode 100644 src/svg/website.svg create mode 100644 src/svg/x.svg create mode 100644 src/svg/youtube.svg diff --git a/App.tsx b/App.tsx index 7961fbf..8996c87 100644 --- a/App.tsx +++ b/App.tsx @@ -2,11 +2,11 @@ import * as React from 'react'; import { DefaultTheme, NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import QRCodeScanner from '@/components/QRCodeScanner/QRCodeScanner'; -import ContactPage from '@/screens/ContactPage/contactPage'; +//import Contact from '@/screens/Contact/Contact'; import HomeScreen from '@/screens/Home/Home'; import LoginScreen from '@/screens/login/LoginScreen'; -import SearchScreen from '@/screens/SearchScreen/SearchScreen'; import TreeInfoPage from '@/screens/TreeInfo/TreeInfo'; +import TreeSearch from '@/screens/TreeSearch/TreeSearch'; import { LoginStackParamList, RootStackParamList } from '@/types/navigation'; const RootStack = createNativeStackNavigator(); @@ -42,15 +42,15 @@ const App = () => { options={{ headerShown: false }} /> - + /> */} ); diff --git a/src/components/searchBar.tsx b/src/components/searchBar.tsx index 367c6c2..38b9988 100644 --- a/src/components/searchBar.tsx +++ b/src/components/searchBar.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { TextInput, View } from 'react-native'; -import { styles } from '../screens/SearchScreen/styles'; +import { styles } from '../screens/TreeSearch/styles'; interface SearchBarProps { value: string; diff --git a/src/icons/ArrowRight.tsx b/src/icons/ArrowRight.tsx new file mode 100644 index 0000000..1057810 --- /dev/null +++ b/src/icons/ArrowRight.tsx @@ -0,0 +1,22 @@ +import type { SVGProps } from 'react'; +import * as React from 'react'; + +const SvgArrowRight = (props: SVGProps) => ( + + + +); +export default SvgArrowRight; diff --git a/src/icons/Back.tsx b/src/icons/Back.tsx new file mode 100644 index 0000000..42542f0 --- /dev/null +++ b/src/icons/Back.tsx @@ -0,0 +1,21 @@ +import type { SVGProps } from 'react'; +import * as React from 'react'; + +const SvgBack = (props: SVGProps) => ( + + + +); +export default SvgBack; diff --git a/src/icons/Call.tsx b/src/icons/Call.tsx new file mode 100644 index 0000000..cb78266 --- /dev/null +++ b/src/icons/Call.tsx @@ -0,0 +1,18 @@ +import type { SVGProps } from 'react'; +import * as React from 'react'; + +const SvgCall = (props: SVGProps) => ( + + + +); +export default SvgCall; diff --git a/src/icons/CallBig.tsx b/src/icons/CallBig.tsx new file mode 100644 index 0000000..cc6f586 --- /dev/null +++ b/src/icons/CallBig.tsx @@ -0,0 +1,18 @@ +import type { SVGProps } from 'react'; +import * as React from 'react'; + +const SvgCallBig = (props: SVGProps) => ( + + + +); +export default SvgCallBig; diff --git a/src/icons/Facebook.tsx b/src/icons/Facebook.tsx new file mode 100644 index 0000000..13e7cd2 --- /dev/null +++ b/src/icons/Facebook.tsx @@ -0,0 +1,18 @@ +import type { SVGProps } from 'react'; +import * as React from 'react'; + +const SvgFacebook = (props: SVGProps) => ( + + + +); +export default SvgFacebook; diff --git a/src/icons/Instagram.tsx b/src/icons/Instagram.tsx new file mode 100644 index 0000000..eb35048 --- /dev/null +++ b/src/icons/Instagram.tsx @@ -0,0 +1,18 @@ +import type { SVGProps } from 'react'; +import * as React from 'react'; + +const SvgInstagram = (props: SVGProps) => ( + + + +); +export default SvgInstagram; diff --git a/src/icons/Location.tsx b/src/icons/Location.tsx new file mode 100644 index 0000000..d633eb2 --- /dev/null +++ b/src/icons/Location.tsx @@ -0,0 +1,25 @@ +import type { SVGProps } from 'react'; +import * as React from 'react'; + +const SvgLocation = (props: SVGProps) => ( + + + + + + + + + + +); +export default SvgLocation; diff --git a/src/icons/OcfLogo.tsx b/src/icons/OcfLogo.tsx new file mode 100644 index 0000000..2948198 --- /dev/null +++ b/src/icons/OcfLogo.tsx @@ -0,0 +1,35 @@ +import type { SVGProps } from 'react'; +import * as React from 'react'; + +const SvgOcfLogo = (props: SVGProps) => ( + + + + + + + + + +); +export default SvgOcfLogo; diff --git a/src/icons/Website.tsx b/src/icons/Website.tsx new file mode 100644 index 0000000..a1059b0 --- /dev/null +++ b/src/icons/Website.tsx @@ -0,0 +1,26 @@ +import type { SVGProps } from 'react'; +import * as React from 'react'; + +const SvgWebsite = (props: SVGProps) => ( + + + + + +); +export default SvgWebsite; diff --git a/src/icons/X.tsx b/src/icons/X.tsx new file mode 100644 index 0000000..f8713b9 --- /dev/null +++ b/src/icons/X.tsx @@ -0,0 +1,20 @@ +import type { SVGProps } from 'react'; +import * as React from 'react'; + +const SvgX = (props: SVGProps) => ( + + + +); +export default SvgX; diff --git a/src/icons/Youtube.tsx b/src/icons/Youtube.tsx new file mode 100644 index 0000000..b99f300 --- /dev/null +++ b/src/icons/Youtube.tsx @@ -0,0 +1,18 @@ +import type { SVGProps } from 'react'; +import * as React from 'react'; + +const SvgYoutube = (props: SVGProps) => ( + + + +); +export default SvgYoutube; diff --git a/src/icons/index.ts b/src/icons/index.ts new file mode 100644 index 0000000..2cff1e3 --- /dev/null +++ b/src/icons/index.ts @@ -0,0 +1,11 @@ +export { default as ArrowRight } from './ArrowRight'; +export { default as Back } from './Back'; +export { default as CallBig } from './CallBig'; +export { default as Call } from './Call'; +export { default as Facebook } from './Facebook'; +export { default as Instagram } from './Instagram'; +export { default as Location } from './Location'; +export { default as OcfLogo } from './OcfLogo'; +export { default as Website } from './Website'; +export { default as X } from './X'; +export { default as Youtube } from './Youtube'; diff --git a/src/screens/Contact/Contact.tsx b/src/screens/Contact/Contact.tsx new file mode 100644 index 0000000..e233609 --- /dev/null +++ b/src/screens/Contact/Contact.tsx @@ -0,0 +1,71 @@ +import React from 'react'; +import { + Linking, + ScrollView, + Text, + TouchableOpacity, + View, +} from 'react-native'; +import { NativeStackScreenProps } from '@react-navigation/native-stack'; +import { RootStackParamList } from '@/types/navigation'; +import ArrowRight from '../svg/arrow-right.svg'; +import Call from '../svg/call.svg'; +import Location from '../svg/location.svg'; +import OcfLogo from '../svg/ocf-logo.svg'; +import Website from '../svg/website.svg'; +import { styles } from './styles'; + +/* type ContactProps = NativeStackScreenProps; + +export default function Contact({ navigation }: ContactProps) { + const openLink = (url: string) => { + Linking.openURL(url).catch(err => console.error("Failed to open URL:", err)); + }; + + const openLocation = () => { + const locationUrl = 'https://www.google.com/maps/place/Our+City+Forest/@37.590136,-122.3968825,10z/data=!4m20!...'; + Linking.openURL(locationUrl).catch(err => console.error("Failed to open location:", err)); + }; + + return ( + + + + + Contact Us + + + navigation.navigate('Directory')} + > + + + Directory + + + + + openLink('https://www.ourcityforest.org/')} + > + + + Website + + + + + + + + Visit Us + + + + + + ); +}; + */ diff --git a/src/screens/Contact/Directory.tsx b/src/screens/Contact/Directory.tsx new file mode 100644 index 0000000..6664784 --- /dev/null +++ b/src/screens/Contact/Directory.tsx @@ -0,0 +1,9 @@ +import React from 'react'; +import { + Linking, + ScrollView, + Text, + TouchableOpacity, + View, +} from 'react-native'; +import { styles } from './styles'; diff --git a/src/screens/ContactPage/styles.ts b/src/screens/Contact/styles.ts similarity index 87% rename from src/screens/ContactPage/styles.ts rename to src/screens/Contact/styles.ts index 3c2f4f1..013afd3 100644 --- a/src/screens/ContactPage/styles.ts +++ b/src/screens/Contact/styles.ts @@ -7,8 +7,19 @@ export const styles = StyleSheet.create({ backgroundColor: 'white', }, - ocfLogo: { + linksButton: { width: '100%', + height: 66, + color: 'gray', + }, + + contactIcons: { + width: 28, + height: 28, + }, + + ocfLogo: { + width: 93, height: 110, }, diff --git a/src/screens/ContactPage/contactPage.tsx b/src/screens/ContactPage/contactPage.tsx deleted file mode 100644 index 4c949d2..0000000 --- a/src/screens/ContactPage/contactPage.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React from 'react'; -import { ScrollView, StyleSheet, Text, View } from 'react-native'; -import { styles } from './styles'; - -export default function App() { - return ( - - - - Contact Us - - - - Location - - 123 Berkeley Way, San Jose, CA 95035 - - - - - Hours - M-TH | 9 AM - 12 PM - - - - Call - 123 - 456 - 7890 - - - - Email - - nurserymanager@ourcityforest.org - - - - - Instagram - Facebook - - - - ); -} diff --git a/src/screens/SearchScreen/SearchScreen.tsx b/src/screens/TreeSearch/TreeSearch.tsx similarity index 91% rename from src/screens/SearchScreen/SearchScreen.tsx rename to src/screens/TreeSearch/TreeSearch.tsx index 4843406..f603ba1 100644 --- a/src/screens/SearchScreen/SearchScreen.tsx +++ b/src/screens/TreeSearch/TreeSearch.tsx @@ -10,10 +10,10 @@ import { import { NativeStackScreenProps } from '@react-navigation/native-stack'; import { RootStackParamList } from '@/types/navigation'; import SearchBar from '../../components/searchBar'; -import { styles } from '../../screens/SearchScreen/styles'; import { getAllSpecies } from '../../supabase/queries/species'; +import { styles } from './styles'; -type SearchScreenProps = NativeStackScreenProps; +type TreeSearchProps = NativeStackScreenProps; type TreeItem = { tree_id: number; @@ -22,7 +22,7 @@ type TreeItem = { sold: boolean; }; -export default function SearchScreen({ navigation }: SearchScreenProps) { +export default function TreeSearch({ navigation }: TreeSearchProps) { const [trees, setTrees] = useState([]); const [searchQuery, setSearchQuery] = useState(''); diff --git a/src/screens/SearchScreen/styles.ts b/src/screens/TreeSearch/styles.ts similarity index 100% rename from src/screens/SearchScreen/styles.ts rename to src/screens/TreeSearch/styles.ts diff --git a/src/svg/arrow-right.svg b/src/svg/arrow-right.svg new file mode 100644 index 0000000..de43e1e --- /dev/null +++ b/src/svg/arrow-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/svg/back.svg b/src/svg/back.svg new file mode 100644 index 0000000..2b35430 --- /dev/null +++ b/src/svg/back.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/svg/call-big.svg b/src/svg/call-big.svg new file mode 100644 index 0000000..eca6862 --- /dev/null +++ b/src/svg/call-big.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/svg/call.svg b/src/svg/call.svg new file mode 100644 index 0000000..0ad46f6 --- /dev/null +++ b/src/svg/call.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/svg/facebook.svg b/src/svg/facebook.svg new file mode 100644 index 0000000..274f27c --- /dev/null +++ b/src/svg/facebook.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/svg/instagram.svg b/src/svg/instagram.svg new file mode 100644 index 0000000..075d791 --- /dev/null +++ b/src/svg/instagram.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/svg/location.svg b/src/svg/location.svg new file mode 100644 index 0000000..d8f8163 --- /dev/null +++ b/src/svg/location.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/svg/ocf-logo.svg b/src/svg/ocf-logo.svg new file mode 100644 index 0000000..3191957 --- /dev/null +++ b/src/svg/ocf-logo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/svg/website.svg b/src/svg/website.svg new file mode 100644 index 0000000..e98ece5 --- /dev/null +++ b/src/svg/website.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/svg/x.svg b/src/svg/x.svg new file mode 100644 index 0000000..80e85fe --- /dev/null +++ b/src/svg/x.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/svg/youtube.svg b/src/svg/youtube.svg new file mode 100644 index 0000000..4637702 --- /dev/null +++ b/src/svg/youtube.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/types/navigation.ts b/src/types/navigation.ts index 15096d7..5bc375a 100644 --- a/src/types/navigation.ts +++ b/src/types/navigation.ts @@ -9,6 +9,6 @@ export type RootStackParamList = { Home: undefined; Scanner: undefined; TreeInfoPage: { treeId: string }; - Search: undefined; + TreeSearch: undefined; Contact: undefined; };