♻️ refactor for minimal changes

This commit is contained in:
Tagaishi
2023-08-27 03:12:02 +02:00
parent 06a0f30ae7
commit 9b7caef6d3
2 changed files with 3 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ export const rssRouter = createTRPCRouter({
}
if (input.feedUrls.length === 0) {
return [{ feed: undefined, success: false }]
return []
}
const result = await Promise.all(

View File

@@ -100,7 +100,7 @@ function RssTile({ widget }: RssTileProps) {
);
}
if (data.length === 1 && !data[0].feed || isError) {
if (data.length < 1 || !data[0].feed || isError) {
return (
<Center h="100%">
<Stack align="center">
@@ -200,7 +200,7 @@ export const useGetRssFeeds = (
// Cache the results for 24 hours
cacheTime: 1000 * 60 * 60 * 24,
staleTime: 1000 * 60 * refreshInterval,
enabled: !!configName || !!feedUrls,
enabled: !!configName,
}
);