MAde it clearer when no more older posts are available

This commit is contained in:
Max Nuding 2023-04-05 20:45:14 +02:00
parent fee1475779
commit bbe3883979
Signed by: phlaym
GPG Key ID: A06651BAB6777237

View File

@ -7,9 +7,15 @@
let title = '';
let disabled: boolean;
$: displayText = isLoading ? 'Loading...' : 'Load More';
$: if (isLoading) {
displayText = 'Loading...';
} else if (!moreAvailable) {
displayText = 'You reached the end';
} else {
displayText = 'Load More';
};
$: disabled = !moreAvailable || isLoading;
$: title = moreAvailable ? 'Load More' : 'No more posts available';
$: title = moreAvailable ? 'Load More' : 'There be dragons!';
const dispatch = createEventDispatcher();