Skip to content

Commit

Permalink
[APD-8876] Update link to add admob account
Browse files Browse the repository at this point in the history
  • Loading branch information
NaLLiFFuNT committed Jan 30, 2020
1 parent 027e1a9 commit fb07c6b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chrome-extension/popup/components/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function Popup ({state}: { state: ExtensionState }) {
</section>
<footer className={showFooterAddButton ? '' : styles.onlyVersion}>
{showFooterAddButton &&
<a className={styles.addBtn} target="_blank" onClick={onClickStartAdmobAccountSetup}>Add another Admob account</a>}
<a className={styles.addBtn} target="_blank" href={"https://www.appodeal.com/apps/linked_networks#AddAdmobAccount"}>Add another Admob account</a>}
<small className={styles.version}>version {getExtensionVersion()}</small>
</footer>
</>;
Expand Down
3 changes: 3 additions & 0 deletions chrome-extension/popup/utils/popupClickHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export async function startAdmobAccountSetup () {
}


/**
* @deprecated
*/
export async function onClickStartAdmobAccountSetup () {
await startAdmobAccountSetup();
setTimeout(() => {window.close();}, 200);
Expand Down
8 changes: 5 additions & 3 deletions src/ui/components/accounts/AccountsComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {AdMobAccount} from 'core/appdeal-api/interfaces/admob-account.interface';
import {AppState} from 'core/store';
import {remote} from 'electron';
import {remote, shell} from 'electron';
import {action, ActionTypes} from 'lib/actions';
import {classNames, singleEvent} from 'lib/dom';
import {sendToMain} from 'lib/messages';
Expand Down Expand Up @@ -76,7 +76,7 @@ export function AccountsComponent (
<div className={style.accountControls}>
<button type="button"
className={style.add}
onClick={singleEvent(() => addAccount(appodealAccount.id))}
onClick={() => shell.openExternal('https://www.appodeal.com/apps/linked_networks#AddAdmobAccount')}
disabled={!appodealAccount.email}
/>
</div>
Expand Down Expand Up @@ -120,7 +120,9 @@ function selectAccount (account: AdMobAccount) {
adMobAccount: account
}));
}

/**
* @deprecated
*/
function addAccount (appodealAccountId: string) {
return sendToMain<{ newAccount: AdMobAccount, existingAccount: AdMobAccount }>(
'accounts',
Expand Down

0 comments on commit fb07c6b

Please sign in to comment.