[redditmon] inbox: tweak subreddit filter UI

This commit is contained in:
Yangshun 2025-08-20 08:45:29 +08:00
parent 056fe0d266
commit 6871813819
3 changed files with 3 additions and 3 deletions

View File

@ -123,7 +123,7 @@ export default function PostList() {
)}
<FetchPostButton />
</div>
<div className="px-2 pb-2">
<div className="px-2 py-2">
<SubredditFilter
selectedSubreddits={selectedSubreddits}
onChange={setSelectedSubreddits}

View File

@ -43,7 +43,6 @@ export default function SubredditFilter({
clearable={true}
data={availableSubreddits}
placeholder="Filter by subreddits"
pt="md"
searchable={true}
size="sm"
value={selectedSubreddits}

View File

@ -91,6 +91,7 @@ export const projectRouter = router({
}),
)
.query(async ({ input: { projectSlug } }) => {
// TODO: This fetch is not secure, anyone with the slug can fetch it!
return await prisma.project.findUnique({
include: {
subredditKeywords: true,
@ -129,7 +130,7 @@ export const projectRouter = router({
if (response.status === 429) {
throw new TRPCError({
code: 'INTERNAL_SERVER_ERROR',
message: `Failed to fetch subreddits. Reddit API rate limit exceeded! Please try again some time.`,
message: `Failed to fetch subreddits. Reddit API rate limit exceeded! Please try again after some time.`,
});
}
if (!response.ok) {