refactor(components): improve type safety and simplify IconButton

- Add proper type guards in ContentWithResolvedProfiles to avoid type assertions
- Remove href/link functionality from IconButton component for simplification
- Replace 'as any' with proper type narrowing using type predicates
This commit is contained in:
Gigi
2025-10-03 01:43:13 +02:00
parent 0964156bcc
commit 0b058440bc
4 changed files with 46 additions and 32 deletions

View File

@@ -0,0 +1,16 @@
---
description: documentation that's useful when dealing with bookmark events (kind:10003 or kind:30003) or anything related to NIP-51
alwaysApply: false
---
Read the nostrbook to understand how bookmarks work:
- https://nostrbook.dev/kinds/10003
- https://nostrbook.dev/kinds/30003
They are defined in NIP-51:
- https://github.com/nostr-protocol/nips/blob/master/51.md
Also refer to the applesauce bookmark helpers:
- https://github.com/hzrd149/applesauce/blob/17c9dbb0f2c263e2ebd01729ea2fa138eca12bd1/packages/core/src/helpers/bookmarks.ts
Make sure to always use applesauce, and use it properly.