mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
✨ Add RSS widget
This commit is contained in:
10
src/hooks/widgets/rss/useGetRssFeed.tsx
Normal file
10
src/hooks/widgets/rss/useGetRssFeed.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
|
||||
export const useGetRssFeed = (feedUrl: string) =>
|
||||
useQuery({
|
||||
queryKey: ['rss-feed', feedUrl],
|
||||
queryFn: async () => {
|
||||
const response = await fetch('/api/modules/rss');
|
||||
return response.json();
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user