forked from elliotBraem/efizzybot
-
Notifications
You must be signed in to change notification settings - Fork 7
Upgrade staging #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Upgrade staging #206
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
08f36a3
add feed conflicts and lowercase id
elliotBraem 713ec36
Adds "my feeds" on profile (#204)
itexpert120 06c695d
Resolve shot's comments (#205)
itexpert120 5e4589b
feat: new feed edit (#198)
itexpert120 c46b92d
Merge branch 'main' into staging
elliotBraem 316a546
debounce
elliotBraem dc44cc7
nitpicks
elliotBraem 00407cc
adds processing step plan
elliotBraem fbfc117
fix auth
elliotBraem 535de16
Feat: recent content (#208)
itexpert120 4211446
Merge branch 'main' of https://github.com/PotLock/curatedotfun into s…
elliotBraem 9fc8273
atuh flow
elliotBraem 3ee14d9
delete old requests
elliotBraem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import type { FeedResponse } from "@curatedotfun/types"; | ||
| import { useFeedStats } from "../../../lib/api/feeds"; | ||
| import { Card } from "./card"; | ||
|
|
||
| interface FeedCardProps { | ||
| feed: FeedResponse; | ||
| } | ||
|
|
||
| export function FeedCard({ feed }: FeedCardProps) { | ||
| const { contentCount, curatorCount } = useFeedStats(feed.id); | ||
|
|
||
| const isComplete = !!( | ||
| feed.config && | ||
| feed.config.name && | ||
| feed.config.description && | ||
| feed.config.sources && | ||
| feed.config.sources.length > 0 | ||
| ); | ||
|
|
||
| const tags: string[] = []; // TODO: Extract tags from feed sources or create a tags system | ||
| const imageSrc = feed.config?.image || "/images/feed-image.png"; | ||
|
|
||
| return ( | ||
| <Card | ||
| id={feed.id} | ||
| image={imageSrc} | ||
| title={feed.name} | ||
| tags={tags} | ||
| description={feed.description || "No description available"} | ||
| createdAt={new Date(feed.createdAt)} | ||
| curators={curatorCount} | ||
| contents={contentCount} | ||
| isCompleted={isComplete} | ||
| /> | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { Search } from "lucide-react"; | ||
| import { Input } from "../../ui/input"; | ||
|
|
||
| interface SearchFormProps { | ||
| searchTerm: string; | ||
| onSearchChange: (value: string) => void; | ||
| } | ||
|
|
||
| export function SearchForm({ searchTerm, onSearchChange }: SearchFormProps) { | ||
| return ( | ||
| <form className="relative w-full md:w-fit"> | ||
| <Input | ||
| placeholder="Search feeds..." | ||
| value={searchTerm} | ||
| onChange={(e) => onSearchChange(e.target.value)} | ||
| className="ps-9 sm:min-w-[300px] w-full" | ||
| /> | ||
| <Search | ||
| className="absolute left-2 top-1/2 -translate-y-1/2 text-black/50 size-5" | ||
| strokeWidth={1.5} | ||
| /> | ||
| </form> | ||
| ); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Simplify the completion check using optional chaining.
The static analysis tool correctly suggests using optional chaining for cleaner, more readable code.
Apply this diff to improve readability:
🧰 Tools
🪛 Biome (1.9.4)
[error] 13-14: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
🤖 Prompt for AI Agents