chore(translations): no posts

This commit is contained in:
plebeius.eth
2024-01-11 18:47:37 +01:00
parent 118ba4a037
commit d1727e65f8
3 changed files with 15 additions and 11 deletions

View File

@@ -13,8 +13,6 @@ import useTimeFilter, { TimeFilterKey } from '../../hooks/use-time-filter';
const lastVirtuosoStates: { [key: string]: StateSnapshot } = {};
const NoPosts = () => 'no posts';
const All = () => {
const subplebbitAddresses = useDefaultSubplebbitAddresses();
const params = useParams<{ sortType?: string; timeFilterName?: string }>();
@@ -46,13 +44,19 @@ const All = () => {
document.title = `p/all - seedit`;
}, [t]);
let Footer;
if (feed?.length === 0) {
Footer = NoPosts;
}
if (hasMore || subplebbitAddresses.length === 0) {
Footer = () => loadingString;
}
const Footer = () => {
let footerContent;
if (feed.length === 0) {
footerContent = t('no_posts');
}
if (hasMore || subplebbitAddresses.length === 0) {
footerContent = loadingString;
}
return <div className={styles.footer}>{footerContent}</div>;
};
const virtuosoRef = useRef<VirtuosoHandle | null>(null);

View File

@@ -63,7 +63,7 @@ const Home = () => {
let footerContent;
if (feed.length === 0) {
footerContent = 'no posts';
footerContent = t('no_posts');
}
if (hasMore || (subplebbitAddresses && subplebbitAddresses.length === 0)) {

View File

@@ -35,7 +35,7 @@ const Subplebbit = () => {
let footerContent;
if (feed.length === 0) {
footerContent = 'no posts';
footerContent = t('no_posts');
}
if (hasMore || subplebbitAddresses.length === 0) {