···8080 };
81818282 $effect(() => {
8383- if (threads.length === 0 && !loading && did) loadMore();
8383+ if (threads.length === 0 && !loading && did) {
8484+ // if we saw all posts dont try to load more.
8585+ // this only really happens if the user has no posts at all
8686+ // but we do have to handle it to not cause an infinite loop
8787+ const cursor = did ? postCursors.get(did as AtprotoDid) : undefined;
8888+ if (!cursor?.end) loadMore();
8989+ }
8490 if (client && did && fetchMoreInteractions) {
8591 // set to false so it doesnt attempt to fetch again while its already fetching
8692 fetchMoreInteractions = false;
+1-1
src/lib/at/client.ts
···196196 if (!res.ok) return res;
197197 data.cursor = res.value.cursor;
198198 data.records.push(...res.value.records);
199199- end = !data.cursor;
199199+ end = data.records.length === 0 || !data.cursor;
200200 if (!end && timestamp > 0) {
201201 const cursorTimestamp = timestampFromCursor(data.cursor);
202202 if (cursorTimestamp === undefined) {
+2
src/routes/[...catchall]/+page.ts
···55import { err, ok, type Result } from '$lib/result';
66import type { PageLoad } from './$types';
7788+export const prerender = false;
99+810export type PageProps = {
911 data: {
1012 client: Result<AtpClient | null, string>;
+4-1
svelte.config.js
···1111 // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
1212 // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
1313 // See https://svelte.dev/docs/kit/adapters for more information about adapters.
1414- adapter: adapter(),
1414+ adapter: adapter({
1515+ fallback: 'index.html',
1616+ precompress: true
1717+ }),
1518 alias: {
1619 $lib: 'src/lib',
1720 '$lib/*': 'src/lib/*',