style: apply prettier formatting

This commit is contained in:
Claude
2026-01-04 18:53:04 +00:00
parent a19c2199b6
commit 5fca0f9316
3 changed files with 8 additions and 8 deletions

View File

@@ -55,7 +55,9 @@ export default function PreviewEventPage() {
// Validate that we got an event-type entity
useEffect(() => {
if (decoded && decoded.type !== "nevent" && decoded.type !== "note") {
toast.error(`Invalid identifier type: expected nevent or note, got ${decoded.type}`);
toast.error(
`Invalid identifier type: expected nevent or note, got ${decoded.type}`,
);
}
}, [decoded]);

View File

@@ -105,9 +105,7 @@ describe("useNip19Decode", () => {
});
it("should handle invalid identifier format", () => {
const { result } = renderHook(() =>
useNip19Decode("invalid-identifier")
);
const { result } = renderHook(() => useNip19Decode("invalid-identifier"));
expect(result.current.decoded).toBeNull();
expect(result.current.error).toBeTruthy();
@@ -115,7 +113,7 @@ describe("useNip19Decode", () => {
it("should handle corrupted bech32 string", () => {
const { result } = renderHook(() =>
useNip19Decode("npub1invalidbech32string")
useNip19Decode("npub1invalidbech32string"),
);
expect(result.current.decoded).toBeNull();
@@ -130,7 +128,7 @@ describe("useNip19Decode", () => {
({ id }: { id: string | undefined }) => useNip19Decode(id),
{
initialProps: { id: npub as string },
}
},
);
const firstResult = result.current;
@@ -149,7 +147,7 @@ describe("useNip19Decode", () => {
({ id }: { id: string | undefined }) => useNip19Decode(id),
{
initialProps: { id: npub as string },
}
},
);
expect(result.current.decoded?.type).toBe("npub");

View File

@@ -50,7 +50,7 @@ export interface UseNip19DecodeResult {
*/
export function useNip19Decode(
identifier: string | undefined,
expectedType?: Nip19EntityType
expectedType?: Nip19EntityType,
): UseNip19DecodeResult {
return useMemo(() => {
if (!identifier) {