mirror of
https://github.com/v0l/route96.git
synced 2025-06-17 21:20:22 +00:00
feat: new UI
chore: update readme fix: upload
This commit is contained in:
@ -1,10 +1,16 @@
|
||||
import { EventPublisher, Nip7Signer } from "@snort/system";
|
||||
import { useMemo } from "react";
|
||||
import useLogin from "./login";
|
||||
|
||||
export default function usePublisher() {
|
||||
const login = useLogin();
|
||||
switch (login?.type) {
|
||||
case "nip7":
|
||||
return new EventPublisher(new Nip7Signer(), login.pubkey);
|
||||
}
|
||||
|
||||
return useMemo(() => {
|
||||
switch (login?.type) {
|
||||
case "nip7":
|
||||
return new EventPublisher(new Nip7Signer(), login.pubkey);
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}, [login?.type, login?.pubkey]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user