Feature: Ability to set an account name (#667)

* Ability to change the account name 
* Ability to set a language to the account

Addresses: #667  #307  

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
Nithin David Thomas
2020-04-06 22:17:07 +05:30
committed by GitHub
parent a1a81e3799
commit 99eaf59509
48 changed files with 1385 additions and 67 deletions

View File

@@ -11,3 +11,12 @@ export const conversationUrl = (accountId, activeInbox, id) => {
: `accounts/${accountId}/conversations/${id}`;
return path;
};
export const accountIdFromPathname = pathname => {
const isInsideAccountScopedURLs = pathname.includes('/app/accounts');
const urlParam = pathname.split('/')[3];
// eslint-disable-next-line no-restricted-globals
const isScoped = isInsideAccountScopedURLs && !isNaN(urlParam);
const accountId = isScoped ? Number(urlParam) : '';
return accountId;
};