feat(catalog): add warning to switch filter if there aren't enough posts in p/all and p/subscriptions

This commit is contained in:
Tom (plebeius.eth)
2024-10-12 15:35:27 +02:00
parent 46e1189711
commit ba9496ca42
3 changed files with 151 additions and 53 deletions
+3 -3
View File
@@ -143,7 +143,7 @@ const Board = () => {
);
const handleNewerPostsButtonClick = () => {
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
window.scrollTo({ top: 0, left: 0 });
setTimeout(() => {
reset();
}, 300);
@@ -202,7 +202,7 @@ const Board = () => {
i18nKey='more_posts_last_week'
values={{ currentTimeFilterName }}
components={{
1: <Link to={(isInAllView ? '/p/all' : isInSubscriptionsView ? '/p/subs' : `/p/${subplebbitAddress}`) + '/1w'} />,
1: <Link to={(isInAllView ? '/p/all' : isInSubscriptionsView ? '/p/subscriptions' : `/p/${subplebbitAddress}`) + '/1w'} />,
}}
/>
</div>
@@ -212,7 +212,7 @@ const Board = () => {
i18nKey='more_posts_last_month'
values={{ currentTimeFilterName }}
components={{
1: <Link to={(isInAllView ? '/p/all' : isInSubscriptionsView ? '/p/subs' : `/p/${subplebbitAddress}`) + '/1m'} />,
1: <Link to={(isInAllView ? '/p/all' : isInSubscriptionsView ? '/p/subscriptions' : `/p/${subplebbitAddress}`) + '/1m'} />,
}}
/>
</div>