+6
-4
src/App.svelte
+6
-4
src/App.svelte
···
16
16
});
17
17
});
18
18
// Infinite loading function
19
-
const onInfinite = ({ detail: { loaded, complete } } : { detail : { loaded : () => void, complete : () => void}}) => {
19
+
const onInfinite = ({
20
+
detail: { loaded, complete },
21
+
}: {
22
+
detail: { loaded: () => void; complete: () => void };
23
+
}) => {
20
24
getNextPosts().then((newPosts) => {
21
25
console.log("Loading next posts...");
22
26
if (newPosts.length > 0) {
···
53
57
{#each posts as postObject}
54
58
<PostComponent post={postObject as Post} />
55
59
{/each}
56
-
<InfiniteLoading on:infinite={onInfinite}
57
-
distance={3000}
58
-
/>
60
+
<InfiniteLoading on:infinite={onInfinite} distance={3000} />
59
61
<div id="spacer"></div>
60
62
</div>
61
63
</div>
+8
src/lib/PostComponent.svelte
+8
src/lib/PostComponent.svelte
···
213
213
#postText {
214
214
margin: 0;
215
215
padding: 0;
216
+
overflow-wrap: break-word;
217
+
word-wrap: break-word;
218
+
-ms-word-break: break-all;
219
+
word-break: break-word;
220
+
-ms-hyphens: auto;
221
+
-moz-hyphens: auto;
222
+
-webkit-hyphens: auto;
223
+
hyphens: auto;
216
224
}
217
225
#headerText {
218
226
margin-left: 10px;