Feature: Improve label experience (#975)
Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user