this repo has no description

Fix typescript and svelte warnings

ari.express 9a2ea504 bba23092

verified
+3 -12
+1 -5
src/App.svelte
··· 16 16 }); 17 17 }); 18 18 // Infinite loading function 19 - const onInfinite = ({ detail: { loaded, complete } }) => { 19 + const onInfinite = ({ detail: { loaded, complete } } : { detail : { loaded : () => void, complete : () => void}}) => { 20 20 getNextPosts().then((newPosts) => { 21 21 if (newPosts.length > 0) { 22 22 posts = [...posts, ...newPosts]; ··· 53 53 <PostComponent post={postObject as Post} /> 54 54 {/each} 55 55 <InfiniteLoading on:infinite={onInfinite} 56 - id="infiniteLoading" 57 56 distance={0} 58 - threshold={0} 59 - useWindow={false} 60 - forceUseWindow={false} 61 57 /> 62 58 <div id="spacer"></div> 63 59 </div>
+2 -2
src/lib/PostComponent.svelte
··· 113 113 <div id="carouselControls"> 114 114 <button 115 115 id="prevBtn" 116 - on:click={prevImage} 116 + onclick={prevImage} 117 117 disabled={currentImageIndex === 0}>←</button 118 118 > 119 119 <div id="carouselIndicators"> ··· 125 125 </div> 126 126 <button 127 127 id="nextBtn" 128 - on:click={nextImage} 128 + onclick={nextImage} 129 129 disabled={currentImageIndex === post.imagesCid.length - 1} 130 130 >→</button 131 131 >
-5
src/lib/pdsfetch.ts
··· 215 215 } 216 216 }); 217 217 if (cutoffDate) { 218 - console.log("Cutoff date:", cutoffDate); 219 218 return cutoffDate; 220 219 } else { 221 220 return new Date(now); ··· 303 302 return postDate <= now; 304 303 }); 305 304 } 306 - // append the new posts to the existing posts 307 305 308 306 const newPosts = records.map((record) => { 309 307 const account = accountsMetadata.find( ··· 316 314 } 317 315 return new Post(record, account); 318 316 }); 319 - console.log("Fetched posts:", newPosts); 320 - console.log("Metadata:", accountsMetadata); 321 317 return newPosts; 322 318 }; 323 319 324 320 const fetchPostsForUser = async (did: At.Did, cursor: string | null) => { 325 321 try { 326 - console.log("Fetching posts for user:", did, "with Cursor: ", cursor); 327 322 const { data } = await rpc.get("com.atproto.repo.listRecords", { 328 323 params: { 329 324 repo: did as At.Identifier,