Revert "refactor toasts"

This reverts commit db2e273ea6.
This commit is contained in:
Tom
2023-06-07 18:26:03 +02:00
parent db2e273ea6
commit 37d49668e4
14 changed files with 87 additions and 121 deletions
@@ -14,6 +14,7 @@ import OfflineIndicator from '../OfflineIndicator';
import SettingsModal from '../modals/SettingsModal';
import getCommentMediaInfo from '../../utils/getCommentMediaInfo';
import handleStyleChange from '../../utils/handleStyleChange';
import useError from '../../hooks/useError';
import useFeedStateString from '../../hooks/useFeedStateString';
import packageJson from '../../../package.json'
const {version} = packageJson
@@ -30,8 +31,8 @@ const SubscriptionsCatalog = () => {
} = useGeneralStore(state => state);
const account = useAccount();
const navigate = useNavigate();
const navigate = useNavigate();
const [prevScrollPos, setPrevScrollPos] = useState(0);
const [visible, setVisible] = useState(true);
const { feed, hasMore, loadMore } = useFeed({subplebbitAddresses: account?.subscriptions, sortType: 'new'});
@@ -40,6 +41,9 @@ const SubscriptionsCatalog = () => {
const stateString = useFeedStateString(subplebbits);
const [errorMessage] = useState(null);
useError(errorMessage, [errorMessage]);
// mobile navbar scroll effect
useEffect(() => {
const debouncedHandleScroll = debounce(() => {