-
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.
[expo] support purchase history check on HomeTabGoods feed
**Summary** We use UPFC credentials to authenticate elineupmall.com and scrape purchase history from the (only) first page. With that information, we can display the status of the latest purchase on the HomeTabGoods feed. **Test** - yarn test **Issue** - #176
- Loading branch information
Showing
26 changed files
with
19,868 additions
and
58 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
56 changes: 28 additions & 28 deletions
56
expo/features/artist/internals/__generated__/useUpsertFollowMutation.graphql.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,47 @@ | ||
import { useUserConfig, useUserConfigUpdator } from '@hpapp/features/app/settings'; | ||
import { FontSize } from '@hpapp/features/common/constants'; | ||
import { ListItem, ListItemSwitch } from '@hpapp/features/common/list'; | ||
import { defineScreen, useScreenTitle } from '@hpapp/features/common/stack'; | ||
import { t } from '@hpapp/system/i18n'; | ||
import { Divider } from '@rneui/themed'; | ||
import { ScrollView, StyleSheet, Text } from 'react-native'; | ||
|
||
import ElineupMallSettingsFollowings from './internal/settings/ElineupMallSettingsFollowings'; | ||
|
||
export default defineScreen('/elineupmall/settings/', function ElineupMallSettingsScreen() { | ||
useScreenTitle(t('Elineup Mall Settings')); | ||
const config = useUserConfig(); | ||
const updator = useUserConfigUpdator(); | ||
return ( | ||
<> | ||
<ScrollView> | ||
<ListItemSwitch | ||
label={ | ||
<> | ||
<Text>{t('Fetch Elnieup Mall Purchase History')}</Text> | ||
<Text style={styles.sublabel}> | ||
{t('FC credentials will be used to fetch your purchase history from elineupmall.')} | ||
</Text> | ||
</> | ||
} | ||
value={config?.elineupmallFetchPurchaseHistory ?? false} | ||
onValueChange={(value) => { | ||
updator({ | ||
...config!, | ||
elineupmallFetchPurchaseHistory: value | ||
}); | ||
}} | ||
/> | ||
<Divider /> | ||
<ListItem> | ||
<Text>{t('Following settings per a member per a category')}</Text> | ||
</ListItem> | ||
<ElineupMallSettingsFollowings /> | ||
</> | ||
</ScrollView> | ||
); | ||
}); | ||
|
||
const styles = StyleSheet.create({ | ||
sublabel: { | ||
fontSize: FontSize.Small | ||
} | ||
}); |
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.