···3 import { onMount } from 'svelte';
4 import { Client, simpleFetchHandler } from '@atcute/client';
5 import type {} from '@atcute/atproto';
067 const { did, pdsUrl, slowPokeMode } = $props();
8···66 throw new Error(`HTTP error! status: ${result.status}`);
67 }
6869- let stream = result.data;
70- const car = fromStream(stream);
007172 try {
73 //This reads the repo as it is downloaded. which was very cool and I didn't know it would do that
74- for await (const entry of car) {
75 let checkForCollection = collections.find(c => c.collection === entry.collection);
76 if (!checkForCollection) {
77 collections.push({ collection: entry.collection, count: 1 });
···83 }
84 } finally {
85 stopTimer();
86- await car.dispose();
87 }
8889 loading = false;
···186 {#if slowPokeMode}
187 <img alt="A Shellder biting a Slowpoke's tail, as seen in the Pokémon anime "
188 src="https://upload.wikimedia.org/wikipedia/en/a/a2/Slowpoke_and_Shellder.jpg">
000189 <br>
190 {/if}
191
···3 import { onMount } from 'svelte';
4 import { Client, simpleFetchHandler } from '@atcute/client';
5 import type {} from '@atcute/atproto';
6+ import { repoEntryTransform } from '@atcute/repo';
78 const { did, pdsUrl, slowPokeMode } = $props();
9···67 throw new Error(`HTTP error! status: ${result.status}`);
68 }
6970+ const { readable, writable } = repoEntryTransform();
71+ result.data.pipeTo(writable);
72+ // let stream = result.data;
73+ // const car = fromStream(stream);
7475 try {
76 //This reads the repo as it is downloaded. which was very cool and I didn't know it would do that
77+ for await (const entry of readable) {
78 let checkForCollection = collections.find(c => c.collection === entry.collection);
79 if (!checkForCollection) {
80 collections.push({ collection: entry.collection, count: 1 });
···86 }
87 } finally {
88 stopTimer();
89+ // await car.dispose();
90 }
9192 loading = false;
···189 {#if slowPokeMode}
190 <img alt="A Shellder biting a Slowpoke's tail, as seen in the Pokémon anime "
191 src="https://upload.wikimedia.org/wikipedia/en/a/a2/Slowpoke_and_Shellder.jpg">
192+ <br>
193+ {:else}
194+ <img alt="text in a speech bubble that says 'Dude, wheres my car'" src="https://canvas-lb.tubitv.com/opts/vONU3oa-F26tCQ==/461d4328-59c2-4dcd-9601-fa749fea4b92/CJcDELQBOgUxLjEuOEAB">
195 <br>
196 {/if}
197