Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Antd updates (#2194)

Matthew Heller135edc613510
diff --git a/web/components/action-buttons/ActionButton/ActionButton.tsx b/web/components/action-buttons/ActionButton/ActionButton.tsx
index 658cdfaf2f..48b5585e5b 100644
--- a/web/components/action-buttons/ActionButton/ActionButton.tsx
+++ b/web/components/action-buttons/ActionButton/ActionButton.tsx
@@ -37,7 +37,7 @@ export const ActionButton: FC<ActionButtonProps> = ({
<Modal
title={description || title}
url={url}
- visible={showModal}
+ open={showModal}
height="80vh"
handleCancel={() => setShowModal(false)}
/>
diff --git a/web/components/action-buttons/FollowButton.tsx b/web/components/action-buttons/FollowButton.tsx
index 0b8de983bb..93d62ad1a7 100644
--- a/web/components/action-buttons/FollowButton.tsx
+++ b/web/components/action-buttons/FollowButton.tsx
@@ -29,7 +29,7 @@ export const FollowButton: FC<FollowButtonProps> = props => {
</Button>
<Modal
title={`Follow ${name}`}
- visible={showModal}
+ open={showModal}
handleCancel={() => setShowModal(false)}
width="550px"
height="200px"
diff --git a/web/components/chat/ChatModerationActionMenu/ChatModerationActionMenu.tsx b/web/components/chat/ChatModerationActionMenu/ChatModerationActionMenu.tsx
index 7b68a54afb..8b4c275c18 100644
--- a/web/components/chat/ChatModerationActionMenu/ChatModerationActionMenu.tsx
+++ b/web/components/chat/ChatModerationActionMenu/ChatModerationActionMenu.tsx
@@ -121,7 +121,7 @@ export const ChatModerationActionMenu: FC<ChatModerationActionMenuProps> = ({
</Dropdown>
<Modal
title={userDisplayName}
- visible={showUserDetailsModal}
+ open={showUserDetailsModal}
handleCancel={() => {
setShowUserDetailsModal(false);
}}
diff --git a/web/components/chat/ChatTextField/ChatTextField.tsx b/web/components/chat/ChatTextField/ChatTextField.tsx
index 9452c4160b..ac4bd0c331 100644
--- a/web/components/chat/ChatTextField/ChatTextField.tsx
+++ b/web/components/chat/ChatTextField/ChatTextField.tsx
@@ -265,8 +265,8 @@ export const ChatTextField: FC<ChatTextFieldProps> = ({ defaultText }) => {
/>
}
trigger="click"
- onVisibleChange={visible => setShowEmojis(visible)}
- visible={showEmojis}
+ onOpenChange={open => setShowEmojis(open)}
+ open={showEmojis}
/>
</Slate>
diff --git a/web/components/common/UserDropdown/UserDropdown.tsx b/web/components/common/UserDropdown/UserDropdown.tsx
index 44b8688f65..555faef087 100644
--- a/web/components/common/UserDropdown/UserDropdown.tsx
+++ b/web/components/common/UserDropdown/UserDropdown.tsx
@@ -92,16 +92,12 @@ export const UserDropdown: FC<UserDropdownProps> = ({ username: defaultUsername
</Dropdown>
<Modal
title="Change Chat Display Name"
- visible={showNameChangeModal}
+ open={showNameChangeModal}
handleCancel={() => setShowNameChangeModal(false)}
>
<NameChangeModal />
</Modal>
- <Modal
- title="Authenticate"
- visible={showAuthModal}
- handleCancel={() => setShowAuthModal(false)}
- >
+ <Modal title="Authenticate" open={showAuthModal} handleCancel={() => setShowAuthModal(false)}>
<AuthModal />
</Modal>
</div>
diff --git a/web/components/ui/Content/Content.tsx b/web/components/ui/Content/Content.tsx
index 14bc22ec04..d333d422e5 100644
--- a/web/components/ui/Content/Content.tsx
+++ b/web/components/ui/Content/Content.tsx
@@ -238,7 +238,7 @@ export const Content: FC = () => {
{externalActionButtons}
<FollowButton size="small" />
<NotifyReminderPopup
- visible={showNotifyReminder}
+ open={showNotifyReminder}
notificationClicked={() => setShowNotifyPopup(true)}
notificationClosed={() => disableNotifyReminderPopup()}
>
@@ -248,7 +248,7 @@ export const Content: FC = () => {
<Modal
title="Notify"
- visible={showNotifyPopup}
+ open={showNotifyPopup}
afterClose={() => disableNotifyReminderPopup()}
handleCancel={() => disableNotifyReminderPopup()}
>
diff --git a/web/components/ui/Modal/Modal.tsx b/web/components/ui/Modal/Modal.tsx
index 1b08ce70c0..6cd361c91d 100644
--- a/web/components/ui/Modal/Modal.tsx
+++ b/web/components/ui/Modal/Modal.tsx
@@ -5,7 +5,7 @@ import styles from './Modal.module.scss';
export type ModalProps = {
title: string;
url?: string;
- visible: boolean;
+ open: boolean;
handleOk?: () => void;
handleCancel?: () => void;
afterClose?: () => void;
@@ -17,7 +17,7 @@ export type ModalProps = {
export const Modal: FC<ModalProps> = ({
title,
url,
- visible,
+ open,
handleOk,
handleCancel,
afterClose,
@@ -51,7 +51,7 @@ export const Modal: FC<ModalProps> = ({
return (
<AntModal
title={title}
- visible={visible}
+ open={open}
onOk={handleOk}
onCancel={handleCancel}
afterClose={afterClose}
diff --git a/web/components/ui/NotifyReminderPopup/NotifyReminderPopup.tsx b/web/components/ui/NotifyReminderPopup/NotifyReminderPopup.tsx
index 3afc039d08..e1a02364b4 100644
--- a/web/components/ui/NotifyReminderPopup/NotifyReminderPopup.tsx
+++ b/web/components/ui/NotifyReminderPopup/NotifyReminderPopup.tsx
@@ -4,7 +4,7 @@ import React, { useState, useEffect, FC } from 'react';
import styles from './NotifyReminderPopup.module.scss';
export type NotifyReminderPopupProps = {
- visible: boolean;
+ open: boolean;
children: React.ReactNode;
notificationClicked: () => void;
notificationClosed: () => void;
@@ -12,16 +12,16 @@ export type NotifyReminderPopupProps = {
export const NotifyReminderPopup: FC<NotifyReminderPopupProps> = ({
children,
- visible,
+ open,
notificationClicked,
notificationClosed,
}) => {
- const [visiblePopup, setVisiblePopup] = useState(visible);
+ const [openPopup, setOpenPopup] = useState(open);
const [mounted, setMounted] = useState(false);
useEffect(() => {
- setVisiblePopup(visible);
- }, [visible]);
+ setOpenPopup(open);
+ }, [open]);
useEffect(() => {
setMounted(true);
@@ -43,7 +43,7 @@ export const NotifyReminderPopup: FC<NotifyReminderPopupProps> = ({
const popupClosed = e => {
e.stopPropagation();
- setVisiblePopup(false);
+ setOpenPopup(false);
notificationClosed();
};
@@ -64,8 +64,8 @@ export const NotifyReminderPopup: FC<NotifyReminderPopupProps> = ({
mounted && (
<Popover
placement="topLeft"
- defaultVisible={visiblePopup}
- visible={visiblePopup}
+ defaultOpen={openPopup}
+ open={openPopup}
destroyTooltipOnHide
title={title}
content={content}