diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-08-08 11:34:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-08 11:34:19 -0700 |
commit | 3c29a1be4d1bd9fb707cb05a8464ca7a094dd8e0 (patch) | |
tree | 9684c4a1c7e015d3cc40894c87fa2eeb7e651f54 /src/lib/api/feed-manip.ts | |
parent | 872a7f93f4a2d1b0fe5050f85984f3b7d5215eae (diff) | |
download | voidsky-3c29a1be4d1bd9fb707cb05a8464ca7a094dd8e0.tar.zst |
Fix to react-key uniqueness in feeds (#1136)
Diffstat (limited to 'src/lib/api/feed-manip.ts')
-rw-r--r-- | src/lib/api/feed-manip.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/api/feed-manip.ts b/src/lib/api/feed-manip.ts index f4bf6cdff..d2bbb4e83 100644 --- a/src/lib/api/feed-manip.ts +++ b/src/lib/api/feed-manip.ts @@ -17,6 +17,12 @@ export class FeedViewPostsSlice { constructor(public items: FeedViewPost[] = []) {} + get _reactKey() { + return `slice-${this.rootItem.post.uri}-${ + this.rootItem.reason?.indexedAt || this.rootItem.post.indexedAt + }` + } + get uri() { if (this.isFlattenedReply) { return this.items[1].post.uri |