mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
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:
committed by
GitHub
parent
a1a81e3799
commit
99eaf59509
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user