mirror of
https://github.com/mue/mue.git
synced 2026-07-13 20:13:47 +02:00
fix: sidebar bug, tab name translation
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
border: none;
|
||||
background: none;
|
||||
min-width: calc(100% - 1.2em);
|
||||
text-align: left;
|
||||
|
||||
&:hover {
|
||||
background: t($modal-sidebarActive);
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
} from '@mui/material';
|
||||
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
import translations from 'modules/translations';
|
||||
|
||||
export default class Radio extends PureComponent {
|
||||
constructor(props) {
|
||||
@@ -18,7 +19,7 @@ export default class Radio extends PureComponent {
|
||||
};
|
||||
}
|
||||
|
||||
handleChange = (e) => {
|
||||
handleChange = async (e) => {
|
||||
const { value } = e.target;
|
||||
|
||||
if (value === 'loading') {
|
||||
@@ -31,10 +32,9 @@ export default class Radio extends PureComponent {
|
||||
localStorage.getItem('tabName') ===
|
||||
variables.language.getMessage(variables.languagecode, 'tabname')
|
||||
) {
|
||||
// todo: fix this it doesn't work and shows as undefined
|
||||
localStorage.setItem(
|
||||
'tabName',
|
||||
import(`../../../../translations/${value.replace('-', '_')}.json`).tabname,
|
||||
translations[value.replace('-', '_')].tabname,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user