mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
empty rows removed
This commit is contained in:
parent
a92f1291da
commit
d29114b49b
1 changed files with 1 additions and 3 deletions
|
|
@ -25,11 +25,9 @@ const Toast = React.forwardRef(({ className }, ref) => {
|
|||
}
|
||||
}, []
|
||||
);
|
||||
|
||||
const hideAll = React.useCallback(() => {
|
||||
dispatch({ type: 'removeAll' });
|
||||
}, []);
|
||||
|
||||
const show = React.useCallback(({ type, icon, title, text, closeButton, timeout, onClick }) => {
|
||||
timeout = timeout !== null && !isNaN(timeout) ? timeout : DEFAULT_TIMEOUT;
|
||||
const close = () => {
|
||||
|
|
@ -45,8 +43,8 @@ const Toast = React.forwardRef(({ className }, ref) => {
|
|||
dispatch({ type: 'add', item: newItem });
|
||||
return close;
|
||||
}, []);
|
||||
|
||||
React.useImperativeHandle(ref, () => ({ show, hideAll }));
|
||||
|
||||
return toastItems.length === 0 ? null : (
|
||||
<ModalsContainerContext.Provider value={toastsContainer}>
|
||||
<Modal className={classnames(className, styles['toast-container'])} disabled={true}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue