Remove use of default props (#4118)
* refactor: replace defaultProps with function parameters in Modal, Statusbar, ChatContainer, and CrossfadeImage components * New commit for Default properties of React components after syncing fork and rebasing * fix: fix linter warning --------- Co-authored-by: swarup <swarupnarkhede999@gmail.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import classNames from 'classnames';
|
||||
import styles from './Statusbar.module.scss';
|
||||
|
||||
// Lazy loaded components
|
||||
|
||||
const EyeFilled = dynamic(() => import('@ant-design/icons/EyeFilled'), {
|
||||
ssr: false,
|
||||
});
|
||||
@@ -40,8 +39,8 @@ function makeDurationString(lastConnectTime: Date): string {
|
||||
|
||||
export const Statusbar: FC<StatusbarProps> = ({
|
||||
online,
|
||||
lastConnectTime,
|
||||
lastDisconnectTime,
|
||||
lastConnectTime = null,
|
||||
lastDisconnectTime = null,
|
||||
viewerCount,
|
||||
className,
|
||||
}) => {
|
||||
@@ -84,8 +83,3 @@ export const Statusbar: FC<StatusbarProps> = ({
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Statusbar.defaultProps = {
|
||||
lastConnectTime: null,
|
||||
lastDisconnectTime: null,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user