Add setting to manage visibility of vote count, vote button and decide root page (#197)

This commit is contained in:
Riccardo Graziosi
2023-02-05 11:55:38 +01:00
committed by GitHub
parent d4242dd78e
commit e7335f5622
35 changed files with 246 additions and 48 deletions

View File

@@ -3,9 +3,12 @@ import I18n from 'i18n-js';
export const getLabel = (
entity: string,
attribute: string,
attribute: string = undefined,
) => (
I18n.t(`activerecord.attributes.${entity}.${attribute}`)
attribute ?
I18n.t(`activerecord.attributes.${entity}.${attribute}`)
:
I18n.t(`activerecord.models.${entity}.one`)
);
export const getValidationMessage = (