I have lots of functions like this:
export function dialogContent() {
const { t, i18n } = this.props;
switch (this.state.dialogHandlerVariable) {
//Delete changeLog
case 0:
return (<div> {t("dialog.dashboard.changelog.deleteChangelog.body")}</div>);
}
}
but here I got an error. -> t is not a function ..
because this is missing:
export default compose(
translate('translations'),
connect()
)(LanguageChooser);
how can I add the translate('translations') part to a function?
thanks
dialogContentas a component it is stateless. So nostate,this, etc.translate('translations'),in my functiondialogContent?translateHOC on the component where you are usingdialogContent