update chat
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { METADATA_SERVICE } from '@lume/stores/constants';
|
||||
|
||||
import useSWR from 'swr';
|
||||
|
||||
const fetcher = (url: string) => fetch(url).then((r: any) => r.json());
|
||||
|
||||
export const useProfile = (pubkey: string) => {
|
||||
const { data, error, isLoading } = useSWR(`https://us.rbr.bio/${pubkey}/metadata.json`, fetcher);
|
||||
const { data, error, isLoading } = useSWR(`${METADATA_SERVICE}/${pubkey}/metadata.json`, fetcher);
|
||||
|
||||
return {
|
||||
user: data ? JSON.parse(data.content ? data.content : null) : null,
|
||||
|
||||
Reference in New Issue
Block a user