Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/TW-821-stable-diffusion-integrat…
Browse files Browse the repository at this point in the history
…ion' into TW-877-change-seach-ux-in-dapps-page
  • Loading branch information
svyatoslavtt committed Aug 11, 2023
2 parents dfdc1e0 + d9b4f8b commit 56c7e73
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 126 deletions.
42 changes: 0 additions & 42 deletions src/components/accept-ads-banner/a-group-banner/a-group-banner.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions src/components/accept-ads-banner/accept-ads-banner.props.ts

This file was deleted.

48 changes: 36 additions & 12 deletions src/components/accept-ads-banner/accept-ads-banner.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
import React, { FC } from 'react';
import { View, Text, StyleProp, ViewStyle } from 'react-native';
import { useDispatch } from 'react-redux';

import { togglePartnersPromotionAction } from 'src/store/partners-promotion/partners-promotion-actions';
import { setAdsBannerVisibilityAction } from 'src/store/settings/settings-actions';
import { formatSize } from 'src/styles/format-size';

import { ABContainer } from '../ab-container/ab-container';
import { AGroupBanner } from './a-group-banner/a-group-banner';
import { BannerProps } from './accept-ads-banner.props';
import { BGroupBanner } from './b-group-banner/b-group-banner';
import { ButtonLargePrimary } from '../button/button-large/button-large-primary/button-large-primary';
import { ButtonLargeSecondary } from '../button/button-large/button-large-secondary/button-large-secondary';
import { Divider } from '../divider/divider';
import { AcceptAdsBannerSelectors } from './accept-ads-banner.selectors';
import { useCommonBannerStyles } from './common-banner.styles';

interface BannerProps {
style?: StyleProp<ViewStyle>;
}

export const AcceptAdsBanner: FC<BannerProps> = ({ style }) => {
const dispatch = useDispatch();
const commonStyles = useCommonBannerStyles();

const handleDisableBannerButton = () => {
dispatch(togglePartnersPromotionAction(false));
Expand All @@ -23,13 +31,29 @@ export const AcceptAdsBanner: FC<BannerProps> = ({ style }) => {
};

return (
<ABContainer
groupAComponent={
<AGroupBanner style={style} onDisable={handleDisableBannerButton} onEnable={handleEnableBannerButton} />
}
groupBComponent={
<BGroupBanner style={style} onDisable={handleDisableBannerButton} onEnable={handleEnableBannerButton} />
}
/>
<View style={[commonStyles.root, style]}>
<Text style={commonStyles.title}>Get paid to discover exciting services and dApps! 👀💰</Text>
<Text style={commonStyles.description}>
Here's the deal: share some data with us (wallet address, IP) to see the most relevant ads and we'll *pay you* a
fair share monthly. By doing so, you support the developers of Temple Wallet. Change your mind? Easily disable
sharing in settings.
</Text>
<Text style={commonStyles.description}>Start earning now!</Text>
<ButtonLargeSecondary
title="No thanks"
onPress={handleDisableBannerButton}
textStyle={commonStyles.buttonText}
buttonStyle={commonStyles.button}
testID={AcceptAdsBannerSelectors.aGroupDisable}
/>
<Divider size={formatSize(8)} />
<ButtonLargePrimary
title="Pay me for every ad I see"
onPress={handleEnableBannerButton}
textStyle={commonStyles.buttonText}
buttonStyle={commonStyles.button}
testID={AcceptAdsBannerSelectors.aGroupEnable}
/>
</View>
);
};

This file was deleted.

47 changes: 0 additions & 47 deletions src/components/accept-ads-banner/b-group-banner/b-group-banner.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/screens/d-apps/d-apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ export const DApps = () => {
}
}, [partnersPromotionEnabled, isEnabledAdsBanner]);

usePageAnalytic(ScreensEnum.DApps);

const sortedDAppsList = useMemo(() => {
if (isDefined(searchValue)) {
return dAppsList.filter(dapp => dapp.name.toLowerCase().includes(searchValue.toLowerCase()));
Expand Down

0 comments on commit 56c7e73

Please sign in to comment.