mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 01:08:50 +01:00
Fix undefined customEmojis
This commit is contained in:
parent
63c6637c24
commit
bd728df79b
1 changed files with 14 additions and 14 deletions
|
@ -141,20 +141,6 @@ function Compose({
|
||||||
|
|
||||||
const prefs = store.account.get('preferences') || {};
|
const prefs = store.account.get('preferences') || {};
|
||||||
|
|
||||||
const customEmojis = useRef();
|
|
||||||
useEffect(() => {
|
|
||||||
(async () => {
|
|
||||||
try {
|
|
||||||
const emojis = await masto.v1.customEmojis.list();
|
|
||||||
console.log({ emojis });
|
|
||||||
customEmojis.current = emojis;
|
|
||||||
} catch (e) {
|
|
||||||
// silent fail
|
|
||||||
console.error(e);
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const oninputTextarea = () => {
|
const oninputTextarea = () => {
|
||||||
if (!textareaRef.current) return;
|
if (!textareaRef.current) return;
|
||||||
textareaRef.current.dispatchEvent(new Event('input'));
|
textareaRef.current.dispatchEvent(new Event('input'));
|
||||||
|
@ -1057,6 +1043,20 @@ const Textarea = forwardRef((props, ref) => {
|
||||||
const snapStates = useSnapshot(states);
|
const snapStates = useSnapshot(states);
|
||||||
const charCount = snapStates.composerCharacterCount;
|
const charCount = snapStates.composerCharacterCount;
|
||||||
|
|
||||||
|
const customEmojis = useRef();
|
||||||
|
useEffect(() => {
|
||||||
|
(async () => {
|
||||||
|
try {
|
||||||
|
const emojis = await masto.v1.customEmojis.list();
|
||||||
|
console.log({ emojis });
|
||||||
|
customEmojis.current = emojis;
|
||||||
|
} catch (e) {
|
||||||
|
// silent fail
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
}, []);
|
||||||
|
|
||||||
const textExpanderRef = useRef();
|
const textExpanderRef = useRef();
|
||||||
const textExpanderTextRef = useRef('');
|
const textExpanderTextRef = useRef('');
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
Loading…
Reference in a new issue