mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-18 19:23:40 +00:00
Pre-calculate timestamp display for perf
This commit is contained in:
parent
7d5f132e1f
commit
35c1b4b2ed
@ -1,6 +1,5 @@
|
||||
# Current
|
||||
|
||||
- [ ] formatTimestamp is expensive, cache it by assigning to events
|
||||
- [ ] Fix hover on notes in modal
|
||||
- [ ] Show loading/success on zap invoice screen
|
||||
- [ ] Fix iOS/safari/firefox
|
||||
@ -36,6 +35,8 @@
|
||||
|
||||
# More
|
||||
|
||||
- [ ] Performance
|
||||
- same deal as with formatTimestamp, don't use functions inline since svelte can't cache them
|
||||
- [ ] Image Uploads
|
||||
- [ ] Add LN invoices
|
||||
- [ ] Contact other client authors, self-hostable, or just use my instance
|
||||
|
@ -55,6 +55,7 @@
|
||||
let showRelays = false
|
||||
|
||||
const {profile} = user
|
||||
const timestamp = formatTimestamp(note.created_at)
|
||||
const borderColor = invertColors ? "medium" : "dark"
|
||||
const links = extractUrls(note.content)
|
||||
const showEntire = anchorId === note.id
|
||||
@ -358,7 +359,7 @@
|
||||
href={"/" + nip19.neventEncode({id: note.id, relays: [note.seen_on]})}
|
||||
class="text-sm text-light"
|
||||
type="unstyled">
|
||||
{formatTimestamp(note.created_at)}
|
||||
{timestamp}
|
||||
</Anchor>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
|
Loading…
Reference in New Issue
Block a user