Feature: Improve label experience (#975)

Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2020-06-25 21:04:03 +05:30
committed by GitHub
parent 8b61452d56
commit 97ad39713b
56 changed files with 1712 additions and 284 deletions

View File

@@ -5,11 +5,14 @@ export const frontendURL = (path, params) => {
return `/app/${path}${stringifiedParams}`;
};
export const conversationUrl = (accountId, activeInbox, id) => {
const path = activeInbox
? `accounts/${accountId}/inbox/${activeInbox}/conversations/${id}`
: `accounts/${accountId}/conversations/${id}`;
return path;
export const conversationUrl = ({ accountId, activeInbox, id, label }) => {
if (activeInbox) {
return `accounts/${accountId}/inbox/${activeInbox}/conversations/${id}`;
}
if (label) {
return `accounts/${accountId}/label/${label}/conversations/${id}`;
}
return `accounts/${accountId}/conversations/${id}`;
};
export const accountIdFromPathname = pathname => {