add gist loading page

format code
This commit is contained in:
DefectingCat
2023-08-14 13:36:15 +08:00
parent d6447c6a8e
commit 32d8d48514
44 changed files with 142 additions and 107 deletions

View File

@ -45,7 +45,7 @@ export const getGists = cache(async (page = 1, perPage = 10) => {
const text = l.match(relMatch)?.[1] as PageKeys;
if (!text) return;
pageSize[text] = new URLSearchParams(
l.match(linkMatch)?.[1].split('?')[1]
l.match(linkMatch)?.[1].split('?')[1],
).get('page');
});
@ -68,9 +68,9 @@ export const getGists = cache(async (page = 1, perPage = 10) => {
} catch (err) {
console.log(err);
}
})
}),
);
})
}),
);
return {
@ -127,7 +127,7 @@ export const getSignalGist = cache(async (id: string) => {
content: '',
};
target.content = await fetch(url).then((res) => res.text());
})
}),
);
return data;