mirror of
https://github.com/owncast/owncast.git
synced 2025-11-03 04:27:18 +08:00
Lazy load some components that aren't needed at load. For #2167
This commit is contained in:
@ -4,12 +4,16 @@ import React, { FC, useMemo, useState } from 'react';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { Transforms, createEditor, BaseEditor, Text, Descendant, Editor, Node, Path } from 'slate';
|
||||
import { Slate, Editable, withReact, ReactEditor, useSelected, useFocused } from 'slate-react';
|
||||
import { EmojiPicker } from './EmojiPicker';
|
||||
import dynamic from 'next/dynamic';
|
||||
import WebsocketService from '../../../services/websocket-service';
|
||||
import { websocketServiceAtom } from '../../stores/ClientConfigStore';
|
||||
import { MessageType } from '../../../interfaces/socket-events';
|
||||
import styles from './ChatTextField.module.scss';
|
||||
|
||||
// Lazy loaded components
|
||||
|
||||
const EmojiPicker = dynamic(() => import('./EmojiPicker').then(mod => mod.EmojiPicker));
|
||||
|
||||
type CustomElement = { type: 'paragraph' | 'span'; children: CustomText[] } | ImageNode;
|
||||
type CustomText = { text: string };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user