mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 16:58:47 +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 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 = () => {
|
||||
if (!textareaRef.current) return;
|
||||
textareaRef.current.dispatchEvent(new Event('input'));
|
||||
|
@ -1057,6 +1043,20 @@ const Textarea = forwardRef((props, ref) => {
|
|||
const snapStates = useSnapshot(states);
|
||||
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 textExpanderTextRef = useRef('');
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Reference in a new issue