mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-04 22:40:29 +03:00
Fix the crash caused by the emoji board load
This commit is contained in:
parent
9e7b37dcd1
commit
a6898e1484
1 changed files with 17 additions and 16 deletions
|
|
@ -197,7 +197,6 @@ export function MessageOptionsMenu({
|
||||||
}: ExtendedOptionsProps) {
|
}: ExtendedOptionsProps) {
|
||||||
const screenSize = useScreenSizeContext();
|
const screenSize = useScreenSizeContext();
|
||||||
const isMobile = screenSize === ScreenSize.Mobile;
|
const isMobile = screenSize === ScreenSize.Mobile;
|
||||||
const [view, setView] = useState('options');
|
|
||||||
|
|
||||||
const eventId = mEvent.getId();
|
const eventId = mEvent.getId();
|
||||||
if (!eventId) return null;
|
if (!eventId) return null;
|
||||||
|
|
@ -247,7 +246,7 @@ export function MessageOptionsMenu({
|
||||||
}}
|
}}
|
||||||
isOpen={isEmojiBoardOpen}
|
isOpen={isEmojiBoardOpen}
|
||||||
>
|
>
|
||||||
<Suspense fallback={<p>Loading</p>}>
|
<Suspense fallback={<p> </p>}>
|
||||||
<EmojiBoard
|
<EmojiBoard
|
||||||
imagePackRooms={imagePackRooms ?? []}
|
imagePackRooms={imagePackRooms ?? []}
|
||||||
returnFocusOnDeactivate
|
returnFocusOnDeactivate
|
||||||
|
|
@ -287,6 +286,7 @@ export function MessageOptionsMenu({
|
||||||
offset={emojiBoardAnchor?.width === 0 ? 0 : undefined}
|
offset={emojiBoardAnchor?.width === 0 ? 0 : undefined}
|
||||||
anchor={emojiBoardAnchor}
|
anchor={emojiBoardAnchor}
|
||||||
content={
|
content={
|
||||||
|
<Suspense fallback={<p> </p>}>
|
||||||
<EmojiBoard
|
<EmojiBoard
|
||||||
imagePackRooms={imagePackRooms ?? []}
|
imagePackRooms={imagePackRooms ?? []}
|
||||||
returnFocusOnDeactivate={false}
|
returnFocusOnDeactivate={false}
|
||||||
|
|
@ -301,6 +301,7 @@ export function MessageOptionsMenu({
|
||||||
}}
|
}}
|
||||||
requestClose={() => setEmojiBoardAnchor(undefined)}
|
requestClose={() => setEmojiBoardAnchor(undefined)}
|
||||||
/>
|
/>
|
||||||
|
</Suspense>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue