mirror of
https://github.com/towfiqi/serpbear
synced 2025-06-26 18:15:54 +00:00
- Adds a new Footer component. - Adds a new Changelog component that displays the changelog.
11 lines
340 B
TypeScript
11 lines
340 B
TypeScript
import { useQuery } from 'react-query';
|
|
|
|
export async function fetchChangelog() {
|
|
const res = await fetch('https://api.github.com/repos/towfiqi/serpbear/releases', { method: 'GET' });
|
|
return res.json();
|
|
}
|
|
|
|
export function useFetchChangelog() {
|
|
return useQuery('changelog', () => fetchChangelog(), { cacheTime: 60 * 60 * 1000 });
|
|
}
|