diff --git a/src/components/postDropdown/container/postDropdownContainer.tsx b/src/components/postDropdown/container/postDropdownContainer.tsx index 8c4544f17..1b5006923 100644 --- a/src/components/postDropdown/container/postDropdownContainer.tsx +++ b/src/components/postDropdown/container/postDropdownContainer.tsx @@ -104,7 +104,7 @@ class PostDropdownContainer extends PureComponent { // Component Functions _handleOnDropdownSelect = async (index) => { - const { content, dispatch, intl } = this.props; + const { content, dispatch, intl, navigation } = this.props; const { options } = this.state; switch (options[index]) { @@ -167,6 +167,11 @@ class PostDropdownContainer extends PureComponent { case 'unpin-community': this._updatePinnedPostCommunity({ unpinPost: true }); break; + case 'edit-history': + navigation.navigate({ + routeName: ROUTES.SCREENS.EDIT_HISTORY, + }); + break; default: break; } diff --git a/src/config/locales/en-US.json b/src/config/locales/en-US.json index ab3db5123..295015ff2 100644 --- a/src/config/locales/en-US.json +++ b/src/config/locales/en-US.json @@ -570,7 +570,8 @@ "pin-blog":"Pin to blog", "unpin-blog":"Unpin from blog", "pin-community":"Pin to community", - "unpin-community":"Unpin from community" + "unpin-community":"Unpin from community", + "edit-history": "Edit History" }, "deep_link": { @@ -807,5 +808,8 @@ "qr_scan": "QR Scan", "open": "Open URL", "detected_url": "Detected URL" + }, + "history": { + "edit": "Edit History" } } diff --git a/src/constants/options/post.js b/src/constants/options/post.js index 510c9d8a8..79ab39148 100644 --- a/src/constants/options/post.js +++ b/src/constants/options/post.js @@ -11,4 +11,5 @@ export default [ 'share', 'bookmarks', 'report', + 'edit-history', ]; diff --git a/src/constants/routeNames.js b/src/constants/routeNames.js index 0880fe222..8807340bb 100644 --- a/src/constants/routeNames.js +++ b/src/constants/routeNames.js @@ -34,6 +34,7 @@ export default { REFER: `Refer${SCREEN_SUFFIX}`, QR: `QR${SCREEN_SUFFIX}`, COIN_DETAILS: `CoinDetails${SCREEN_SUFFIX}`, + EDIT_HISTORY: `EditHistory${SCREEN_SUFFIX}`, }, DRAWER: { MAIN: `Main${DRAWER_SUFFIX}`, diff --git a/src/navigation/routes.js b/src/navigation/routes.js index ebcc351cf..da36799d8 100644 --- a/src/navigation/routes.js +++ b/src/navigation/routes.js @@ -41,6 +41,7 @@ import { WebBrowser, ReferScreen, CoinDetails, + EditHistoryScreen, } from '../screens'; const bottomTabNavigator = createBottomTabNavigator( @@ -156,6 +157,7 @@ const stackNavigator = createStackNavigator( [ROUTES.SCREENS.WEB_BROWSER]: { screen: WebBrowser }, [ROUTES.SCREENS.REFER]: { screen: ReferScreen }, [ROUTES.SCREENS.COIN_DETAILS]: { screen: CoinDetails }, + [ROUTES.SCREENS.EDIT_HISTORY]: { screen: EditHistoryScreen }, }, { headerMode: 'none', diff --git a/src/screens/editHistoryScreen/editHistoryScreen.tsx b/src/screens/editHistoryScreen/editHistoryScreen.tsx new file mode 100644 index 000000000..73b1dffbc --- /dev/null +++ b/src/screens/editHistoryScreen/editHistoryScreen.tsx @@ -0,0 +1,31 @@ +import React, { Fragment } from 'react'; +import { useEffect, useState } from 'react'; +import { useIntl } from 'react-intl'; +import { Text, View } from 'react-native'; +import { + BasicHeader, +} from '../../components'; + +// styles +import EStyleSheet from 'react-native-extended-stylesheet'; +import styles from './editHistoryScreenStyles'; + +const EditHistoryScreen = ({ navigation }) => { + const intl = useIntl(); + return ( + + + + + Edit History Screen + + + + ); +}; + +export default EditHistoryScreen; diff --git a/src/screens/editHistoryScreen/editHistoryScreenStyles.ts b/src/screens/editHistoryScreen/editHistoryScreenStyles.ts new file mode 100644 index 000000000..d038f6430 --- /dev/null +++ b/src/screens/editHistoryScreen/editHistoryScreenStyles.ts @@ -0,0 +1,94 @@ +import EStyleSheet from 'react-native-extended-stylesheet'; + +export default EStyleSheet.create({ + mainContainer:{ + flex:1, + backgroundColor: '$primaryBackgroundColor', + }, + pointsContainer: { + paddingVertical: 16, + alignItems: 'center', + }, + pointsEarnedRow: { + flexDirection: 'row', + marginBottom: 16, + }, + earnedWrapper: { + marginRight: 32, + }, + pendingWrapper: { + marginLeft: 32, + }, + points: { + color: '$primaryBlue', + fontSize: 26, + marginTop: 24, + justifyContent: 'center', + alignSelf: 'center', + fontWeight: 'bold', + }, + earendText: { + color: '$darkIconColor', + fontSize: 16, + justifyContent: 'center', + marginTop: 5, + }, + emptyText:{ + color: '$primaryDarkText', + fontSize: 16, + justifyContent: 'center', + marginTop: 5, + padding: 32, + textAlign:'center' + }, + mainButton: { + marginTop: 16, + alignSelf: 'center', + paddingHorizontal: 24, + }, + mainButtonWrapper: { + flexDirection: 'row', + }, + unclaimedText: { + color: '$pureWhite', + fontSize: 14, + fontWeight: 'bold', + alignSelf: 'center', + textTransform: 'uppercase', + }, + mainIconWrapper: { + justifyContent: 'center', + alignSelf: 'center', + alignItems: 'center', + marginLeft: 20, + }, + referralsListContainer: { + flex: 1, + }, + listContentContainer:{ + + }, + rewardText: { + width: 120, + }, + dollarSign: { + color: '$primaryDarkGray', + fontSize: 14, + fontWeight: 'bold', + marginRight: 8, + }, + blueDollarSign: { + color: '$primaryBlue', + }, + rightItemRendererContainer:{ + paddingHorizontal:8, + height:40, + justifyContent:'center' + }, + rightItemText:{ + textAlign:'right', + color: '$primaryBlue', + fontSize: 14, + fontWeight: 'bold', + } +}); diff --git a/src/screens/index.js b/src/screens/index.js index b9ebd9b80..d3dae37b4 100755 --- a/src/screens/index.js +++ b/src/screens/index.js @@ -28,6 +28,7 @@ import { Community } from './community'; import Communities from './communities'; import ReferScreen from './referScreen/referScreen'; import CoinDetails from './coinDetails'; +import EditHistoryScreen from './editHistoryScreen/editHistoryScreen'; export { Bookmarks, @@ -60,4 +61,5 @@ export { WebBrowser, ReferScreen, CoinDetails, + EditHistoryScreen, };