Fix: System messages would break replies.

Fix: Show correct time format on left side of messages.
This commit is contained in:
Paul
2021-07-06 19:29:09 +01:00
parent 8d0969d47e
commit fd23fdb206
10 changed files with 58 additions and 27 deletions

View File

@@ -12,11 +12,21 @@ interface Props {
fields: Fields;
}
export interface Dictionary {
dayjs: {
defaults: {
twelvehour: 'yes' | 'no';
separator: string;
date: "traditional" | "simplified" | "ISO8601";
},
timeFormat: string
};
[key: string]: Object | string;
}
export interface IntlType {
intl: {
dictionary: {
[key: string]: Object | string;
};
dictionary: Dictionary;
};
}
@@ -60,3 +70,8 @@ export function useTranslation() {
return (id: string, fields?: Object, plural?: number, fallback?: string) =>
translate(id, "", intl.dictionary, fields, plural, fallback);
}
export function useDictionary() {
const { intl } = useContext(IntlContext) as unknown as IntlType;
return intl.dictionary;
}