lint: use svelte/reactivity classes
This commit is contained in:
11 files changed
+31
-52
No files matched your search
@@ -6,7 +6,7 @@
|
||||
post: PostView
|
||||
}
|
||||
|
||||
let { post } = $props()
|
||||
let { post }: Props = $props()
|
||||
</script>
|
||||
|
||||
<Post {post} class="py-0!" />
|
||||
@@ -1,5 +1,6 @@
|
||||
import { settings } from '$lib/settings.svelte'
|
||||
import type { PostView } from 'lemmy-js-client'
|
||||
import { SvelteMap, SvelteSet } from 'svelte/reactivity'
|
||||
|
||||
export type PostViewWithCrossposts = PostView & {
|
||||
withCrossposts: true
|
||||
@@ -10,12 +11,12 @@ export type PostViewWithoutCrossposts = PostView & { withCrossposts?: false }
|
||||
export const combineCrossposts = (
|
||||
posts: PostView[],
|
||||
): (PostViewWithCrossposts | PostViewWithoutCrossposts)[] => {
|
||||
const urlMap = new Map<
|
||||
const urlMap = new SvelteMap<
|
||||
string,
|
||||
PostViewWithCrossposts | PostViewWithoutCrossposts
|
||||
>()
|
||||
const results: (PostViewWithCrossposts | PostViewWithoutCrossposts)[] = []
|
||||
const seenUrls = new Set<string>()
|
||||
const seenUrls = new SvelteSet<string>()
|
||||
|
||||
posts?.forEach(post => {
|
||||
if (
|
||||
|
||||
Reference in new issue
Block a user