Merge pull request 'media URLs and nostr refs' (#71) from refs into main
Reviewed-on: Kieran/stream#71 Reviewed-by: Kieran <kieran@noreply.localhost>
This commit is contained in:
9
src/hooks/placeholders.ts
Normal file
9
src/hooks/placeholders.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { useMemo } from "react";
|
||||
|
||||
export default function usePlaceholder(pubkey: string) {
|
||||
const url = useMemo(
|
||||
() => `https://robohash.v0l.io/${pubkey}.png?set=2`,
|
||||
[pubkey]
|
||||
);
|
||||
return url;
|
||||
}
|
Reference in New Issue
Block a user