Implement new auto-size text area.

Add bars + header + sidebar to channels.
This commit is contained in:
Paul
2021-06-21 21:11:53 +01:00
parent d965b20ee2
commit 602cca1047
27 changed files with 1140 additions and 242 deletions

View File

@@ -1,4 +1,4 @@
import { IntlContext } from "preact-i18n";
import { IntlContext, translate } from "preact-i18n";
import { useContext } from "preact/hooks";
import { Children } from "../types/Preact";
@@ -52,3 +52,8 @@ export function TextReact({ id, fields }: Props) {
return <>{ recursiveReplaceFields(entry as string, fields) }</>;
}
export function useTranslation() {
const { intl } = useContext(IntlContext) as unknown as IntlType;
return (id: string, fields?: Object, plural?: number, fallback?: string) => translate(id, "", intl.dictionary, fields, plural, fallback);
}