-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from cuappdev/main-copy
Merge External Profiles to Release
- Loading branch information
Showing
13 changed files
with
1,201 additions
and
341 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
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
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,60 @@ | ||
import React from "react"; | ||
import { View, Text, Platform, StyleSheet } from "react-native"; | ||
import { ProductList } from "../components/ProductList"; | ||
import { fonts } from "../globalStyle/globalFont"; | ||
import LoadingScreen from "./LoadingScreen"; | ||
|
||
export const ExternalPostRoute = ({ | ||
navigation, | ||
isLoading, | ||
fetchFailed, | ||
posts, | ||
onRefresh, | ||
}) => ( | ||
<View | ||
style={{ | ||
height: "100%", | ||
flex: 1, | ||
}} | ||
> | ||
{isLoading ? ( | ||
<LoadingScreen screen={"Profile"} /> | ||
) : fetchFailed ? ( | ||
<LoadingScreen screen={"Profile"} /> | ||
) : posts.length > 0 ? ( | ||
<ProductList | ||
data={posts} | ||
screen={"Profile"} | ||
navigation={navigation} | ||
onRefresh={onRefresh} | ||
/> | ||
) : ( | ||
<View | ||
style={[ | ||
styles.noResultView, | ||
Platform.OS === "ios" ? { marginBottom: 60 } : { marginBottom: 90 }, | ||
]} | ||
> | ||
<Text style={[fonts.pageHeading2, { marginBottom: 8 }]}> | ||
No listings posted | ||
</Text> | ||
<Text style={[fonts.body1, styles.bodyText]}> | ||
When you post a listing, it will be displayed here | ||
</Text> | ||
</View> | ||
)} | ||
</View> | ||
); | ||
|
||
const styles = StyleSheet.create({ | ||
noResultView: { | ||
flex: 1, | ||
justifyContent: "center", | ||
alignItems: "center", | ||
}, | ||
bodyText: { | ||
color: "#707070", | ||
marginHorizontal: 48, | ||
textAlign: "center", | ||
} | ||
}); |
Oops, something went wrong.