-
Notifications
You must be signed in to change notification settings - Fork 2
Feature: NDK integration and profile search #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Maphikza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I came upon two issues when I tried to build it so that I can test it. The first is, "src/components/relay-dashboard/paid-subscribers/SubscriberDetailModal/SubscriberDetailModal.tsx
Line 46:49: ' can be escaped with ', ‘, ', ’ react/no-unescaped-entities" this was easy to work through but then I got this after that, "/Users/siphiwetapisi/HORNETS-Relay-Panel/src/components/auth/LoginForm/LoginForm.tsx
TypeScript error in /Users/siphiwetapisi/HORNETS-Relay-Panel/src/components/auth/LoginForm/LoginForm.tsx(73,34):
Property 'content' does not exist on type '{ sig: string; }'. TS2339
71 |
72 | const response = await verifyChallenge({
> 73 | challenge: signedEvent.content,
| ^
74 | signature: signedEvent.sig,
75 | messageHash: signedEvent.id,
76 | event: signedEvent," this one is harder. I have no idea what's causing it and it's making it harder to review. did you test login when you were building?
This pull request introduces several enhancements and refactorings across the codebase, including the integration of the NDK library for handling Nostr-related functionality, improvements to the search and subscriber profile features, and various styling updates. With NDK, we can now search NDKUserProfiles if we don't have the data already. Additionally, some unused components and redundant code have been removed to streamline the project.
NOTE: Make sure you run yarn install before testing
Integration of NDK Library and Nostr Features:
package.jsondependencies for Nostr protocol integration. ([package.jsonR16-R20](https://github.com/HORNET-Storage/HORNETS-Relay-Panel/pull/56/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R16-R20))src/App.tsx. ([src/App.tsxR16-R34](https://github.com/HORNET-Storage/HORNETS-Relay-Panel/pull/56/files#diff-26ad4b834941d9b19ebf9db8082bd202aaf72ea0ddea85f5a8a0cb3c729cc6f2R16-R34))SearchDropdown. Includes handling invalid public keys and fetching additional profile details. (F5061ea2L23R122)Search and Subscriber Profile Enhancements:
SearchDropdown. Includes modal display for subscriber details and error handling for invalid keys. (F5061ea2L23R122)SubscriberDetailModalcomponent and associated styles. ([[1]](https://github.com/HORNET-Storage/HORNETS-Relay-Panel/pull/56/files#diff-5942fdfcf38f8e2a56ddaf32cb0aae3334be1c4d95a78e4ad2c557bcfa57f645L1-L193),[[2]](https://github.com/HORNET-Storage/HORNETS-Relay-Panel/pull/56/files#diff-8747eb3eb6e51278b19d35a37f6f70556d4b45d4b409cb40b32c1e71285a2569L1-L145),[[3]](https://github.com/HORNET-Storage/HORNETS-Relay-Panel/pull/56/files#diff-751823e8e457e806b5ab9848440672eff8f17318919d457f5c61a50b229ce2f0L1))@Maphikza
Currently, the dummy profiles are still being used in usePaidSubscribers. If you want to test the PaidSubscriber component, you can swap out the DummyProfiles test data with testSubscribers in usePaidSubscribers.
Also, the search bar only supports hex pubkeys rn. The UI could be improved for the 'invalid pubkey' message, but it's okay for now.
Also sometimes it's hard to click on the Subscribers in the Splide component, but I'm unable to find the cause at this moment.