extract strings from actions tab

This commit is contained in:
Amruth Pillai
2020-03-30 11:32:32 +05:30
parent 154e4d22a8
commit af3ec283d0
4 changed files with 64 additions and 32 deletions

View File

@ -16,8 +16,14 @@ const RightSidebar = () => {
const { state, dispatch } = context;
const { data, theme } = state;
const tabs = [t('templates.title'), t('colors.title'), t('fonts.title'), 'Actions', 'About'];
const [currentTab, setCurrentTab] = useState(t('fonts.title'));
const tabs = [
t('templates.title'),
t('colors.title'),
t('fonts.title'),
t('actions.title'),
'About',
];
const [currentTab, setCurrentTab] = useState(t('actions.title'));
const onChange = (key, value) => {
dispatch({
type: 'on_input',
@ -38,7 +44,7 @@ const RightSidebar = () => {
return <ColorsTab theme={theme} onChange={onChange} />;
case t('fonts.title'):
return <FontsTab theme={theme} onChange={onChange} />;
case 'Actions':
case t('actions.title'):
return <ActionsTab data={data} theme={theme} dispatch={dispatch} />;
case 'About':
return <AboutTab />;