WIP
This commit is contained in:
@@ -5,7 +5,11 @@ export function useOpenGraph(url: string) {
|
||||
const { status, data, error, isFetching } = useQuery(
|
||||
["preview", url],
|
||||
async () => {
|
||||
return await getLinkPreview(url);
|
||||
const res = await getLinkPreview(url);
|
||||
if (!res) {
|
||||
throw new Error("Can' fetch");
|
||||
}
|
||||
return res;
|
||||
},
|
||||
{
|
||||
refetchOnWindowFocus: false,
|
||||
|
||||
Reference in New Issue
Block a user