-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Frontend pagination and many API fetch fixes (#234)
* add google ios client id to credentials * wrap restaurant and food name text in user home * use const google ios client id * user restaurants screen pagination * user food screen pagination * move user's home list item to generic component * user home screen restaurant pagination * user home screen food pagination * fix price indicator crash bug * fixes * cleanup * send coordinates to getRestaurantById * remove unnecessary new Date in food POST
- Loading branch information
Audrius Savickas
authored
Dec 7, 2021
1 parent
b4becb5
commit 63873b1
Showing
36 changed files
with
323 additions
and
174 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export const GOOGLE_MAPS_API_KEY = "" | ||
export const GOOGLE_IOS_CLIENT_ID = "" |
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,4 @@ | ||
export interface Pagination { | ||
pageNumber: number | ||
pageSize: number | ||
} |
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
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
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
1 change: 1 addition & 0 deletions
1
frontend/wasted-app/src/components/horizontal-list/interfaces.ts
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export interface HorizontalListProps { | ||
items: any | ||
renderItem: (item: any) => JSX.Element | ||
onEndReached: () => void | ||
} |
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
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
28 changes: 28 additions & 0 deletions
28
frontend/wasted-app/src/components/sections/horizontal-list-item/horizontal-list-item.tsx
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,28 @@ | ||
import React from "react" | ||
import {Image, Text, TouchableOpacity, View} from "react-native-ui-lib" | ||
import {HorizontalListItemProps} from "./interfaces" | ||
|
||
export const HorizontalListItem = ({name, imageURL, tag, onPress}: HorizontalListItemProps) => { | ||
return ( | ||
<TouchableOpacity margin-s1 centerH onPress={onPress}> | ||
<Image | ||
source={{ | ||
uri: imageURL, | ||
width: 100, | ||
height: 100 | ||
}} | ||
style={{width: 100, height: 100}} | ||
/> | ||
<Text marginT-s1 center style={{width: 100}}> | ||
{name} | ||
</Text> | ||
{tag && ( | ||
<View br20 bg-purple30 padding-s1 paddingH-s2 marginT-s1> | ||
<Text white text90M> | ||
{tag} | ||
</Text> | ||
</View> | ||
)} | ||
</TouchableOpacity> | ||
) | ||
} |
1 change: 1 addition & 0 deletions
1
frontend/wasted-app/src/components/sections/horizontal-list-item/index.ts
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 @@ | ||
export {HorizontalListItem} from "./horizontal-list-item" |
6 changes: 6 additions & 0 deletions
6
frontend/wasted-app/src/components/sections/horizontal-list-item/interfaces.ts
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,6 @@ | ||
export interface HorizontalListItemProps { | ||
imageURL: string | ||
name: string | ||
tag?: string | ||
onPress: () => void | ||
} |
Oops, something went wrong.