perf/UX audit round 2, fix eggplant reaction button
Some checks failed
Some checks failed
Runtime: memoize selectors in report modal, event discussion, followed tag filter, and upload form to avoid unnecessary allocations. Bundle: lazy-load crypto icons (500+ SVGs), remove datepicker CSS from main entry (already in lazy wrapper), drop unused Inter 200/300 weights. Stability: add null guards in compose upload and conversation components, add keyboard handler to reply mentions button, surface local translation unavailability instead of swallowing errors. Fix eggplant button: preferences toggle was still writing to the old showWrenchButton setting key, so the eggplant reaction button could never be enabled.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { FormattedMessage, useIntl } from 'react-intl';
|
||||
|
||||
import { eventDiscussionCompose } from '@/actions/compose';
|
||||
@ -32,7 +32,8 @@ const EventDiscussionPage: React.FC = () => {
|
||||
|
||||
const me = useAppSelector((state) => state.me);
|
||||
|
||||
const descendantsIds = useAppSelector(state => getDescendantsIds(state, statusId).filter(id => id !== statusId));
|
||||
const allDescendantsIds = useAppSelector(state => getDescendantsIds(state, statusId));
|
||||
const descendantsIds = useMemo(() => allDescendantsIds.filter(id => id !== statusId), [allDescendantsIds, statusId]);
|
||||
|
||||
const [isLoaded, setIsLoaded] = useState<boolean>(!!status);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user