Rename document tab in sidebar based on editor mode
[MAILPOET-6336]
This commit is contained in:
committed by
Rostislav Wolný
parent
ed8d64816c
commit
c612eb1c4e
@ -13,12 +13,16 @@ import { Tabs } from '../../private-apis';
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { mainSidebarDocumentTab, mainSidebarBlockTab } from '../../store';
|
||||
import { useEditorMode } from '../../hooks';
|
||||
|
||||
export function HeaderTabs( _, ref ) {
|
||||
const [ editorMode ] = useEditorMode();
|
||||
return (
|
||||
<Tabs.TabList ref={ ref }>
|
||||
<Tabs.Tab tabId={ mainSidebarDocumentTab }>
|
||||
{ __( 'Email', 'mailpoet' ) }
|
||||
{ editorMode === 'template'
|
||||
? __( 'Template', 'mailpoet' )
|
||||
: __( 'Email', 'mailpoet' ) }
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab tabId={ mainSidebarBlockTab }>{ __( 'Block' ) }</Tabs.Tab>
|
||||
</Tabs.TabList>
|
||||
|
Reference in New Issue
Block a user