MAde it clearer when no more older posts are available
This commit is contained in:
parent
fee1475779
commit
bbe3883979
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user