nicolium: what is IComponentInterface supposed to mean lol
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -18,7 +18,7 @@ import './tabs.css';
|
||||
const HORIZONTAL_PADDING = 8;
|
||||
const AnimatedContext = React.createContext(null);
|
||||
|
||||
interface IAnimatedInterface {
|
||||
interface IAnimatedTabs {
|
||||
/** Callback when a tab is chosen. */
|
||||
onChange(index: number): void;
|
||||
/** Default tab index. */
|
||||
@ -27,7 +27,7 @@ interface IAnimatedInterface {
|
||||
}
|
||||
|
||||
/** Tabs with a sliding active state. */
|
||||
const AnimatedTabs: React.FC<IAnimatedInterface> = ({ children, ...rest }) => {
|
||||
const AnimatedTabs: React.FC<IAnimatedTabs> = ({ children, ...rest }) => {
|
||||
const [activeRect, setActiveRect] = React.useState(null);
|
||||
const ref = React.useRef<any>(null);
|
||||
const rect = useRect(ref);
|
||||
|
||||
@ -31,12 +31,12 @@ const messages = defineMessages({
|
||||
settings: { id: 'chat_list_item.settings', defaultMessage: 'Chat settings' },
|
||||
});
|
||||
|
||||
interface IChatListItemInterface {
|
||||
interface IChatListItem {
|
||||
chat: Chat;
|
||||
onClick: (chat: Chat) => void;
|
||||
}
|
||||
|
||||
const ChatListItem: React.FC<IChatListItemInterface> = React.memo(({ chat, onClick }) => {
|
||||
const ChatListItem: React.FC<IChatListItem> = React.memo(({ chat, onClick }) => {
|
||||
const { openModal } = useModalsActions();
|
||||
const intl = useIntl();
|
||||
const features = useFeatures();
|
||||
|
||||
@ -11,11 +11,11 @@ import { useShoutboxMessages } from '@/stores/shoutbox';
|
||||
|
||||
import type { Chat } from 'pl-api';
|
||||
|
||||
interface IChatListShoutboxInterface {
|
||||
interface IChatListShoutbox {
|
||||
onClick: (chat: Chat | 'shoutbox') => void;
|
||||
}
|
||||
|
||||
const ChatListShoutbox: React.FC<IChatListShoutboxInterface> = ({ onClick }) => {
|
||||
const ChatListShoutbox: React.FC<IChatListShoutbox> = ({ onClick }) => {
|
||||
const instance = useInstance();
|
||||
const { logo } = useFrontendConfig();
|
||||
const messages = useShoutboxMessages();
|
||||
|
||||
@ -21,7 +21,7 @@ const messages = defineMessages({
|
||||
uploadErrorLimit: { id: 'upload_error.limit', defaultMessage: 'File upload limit exceeded.' },
|
||||
});
|
||||
|
||||
interface ChatInterface {
|
||||
interface IChat {
|
||||
chat: ChatEntity;
|
||||
inputRef?: MutableRefObject<HTMLTextAreaElement | null>;
|
||||
className?: string;
|
||||
@ -50,7 +50,7 @@ const clearNativeInputValue = (element: HTMLTextAreaElement) => {
|
||||
* Chat UI with just the messages and textarea.
|
||||
* Reused between floating desktop chats and fullscreen/mobile chats.
|
||||
*/
|
||||
const Chat: React.FC<ChatInterface> = ({ chat, inputRef, className }) => {
|
||||
const Chat: React.FC<IChat> = ({ chat, inputRef, className }) => {
|
||||
const intl = useIntl();
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
|
||||
@ -10,12 +10,12 @@ import ShoutboxMessageList from './shoutbox-message-list';
|
||||
|
||||
const fileKeyGen = (): number => Math.floor(Math.random() * 0x10000);
|
||||
|
||||
interface ChatInterface {
|
||||
interface IShoutbox {
|
||||
inputRef?: MutableRefObject<HTMLTextAreaElement | null>;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const Shoutbox: React.FC<ChatInterface> = ({ inputRef, className }) => {
|
||||
const Shoutbox: React.FC<IShoutbox> = ({ inputRef, className }) => {
|
||||
const [content, setContent] = useState<string>('');
|
||||
const [resetContentKey, setResetContentKey] = useState<number>(fileKeyGen());
|
||||
const [errorMessage] = useState<string>();
|
||||
|
||||
Reference in New Issue
Block a user