Skip to content

Commit

Permalink
TW-933 Used Aplha version of banner
Browse files Browse the repository at this point in the history
  • Loading branch information
herkoss committed Aug 8, 2023
1 parent 4d06580 commit e565359
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 124 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.

0 comments on commit e565359

Please sign in to comment.