-
Notifications
You must be signed in to change notification settings - Fork 88
Pr 486 #490
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
Pr 486 #490
Changes from all commits
9dc0742
f22f059
0730da5
00b1dcf
9a2e13f
ebc1875
d8880ab
b6738bc
46e4461
431cf43
803c401
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -28,7 +28,7 @@ interface SubmissionCardProps { | |||||||||||||||||||||||||||
| title: string; | ||||||||||||||||||||||||||||
| description: string; | ||||||||||||||||||||||||||||
| submitterName: string; | ||||||||||||||||||||||||||||
| submitterAvatar?: string; | ||||||||||||||||||||||||||||
| submitterAvatar?: string | null; | ||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a null-avatar fallback in the header avatar UI. Line 31 now allows Suggested fix- <div
- style={{ backgroundImage: `url(${submitterAvatar})` }}
- className={`size-8 rounded-full border-2 bg-white bg-cover bg-center ${isPinned ? 'border-primary' : 'border-[`#2B2B2B`]'}`}
- ></div>
+ {submitterAvatar ? (
+ <div
+ style={{ backgroundImage: `url(${submitterAvatar})` }}
+ className={`size-8 rounded-full border-2 bg-white bg-cover bg-center ${isPinned ? 'border-primary' : 'border-[`#2B2B2B`]'}`}
+ />
+ ) : (
+ <div
+ className={`flex size-8 items-center justify-center rounded-full border-2 bg-zinc-800 text-xs font-bold text-zinc-300 ${isPinned ? 'border-primary' : 'border-[`#2B2B2B`]'}`}
+ >
+ {submitterName.charAt(0).toUpperCase()}
+ </div>
+ )}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
| category?: string; | ||||||||||||||||||||||||||||
| categories?: string[]; | ||||||||||||||||||||||||||||
| status?: 'Pending' | 'Approved' | 'Rejected'; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,15 +2,15 @@ export interface TeamMember { | |
| id: string; | ||
| name: string; | ||
| role: string; | ||
| avatar?: string; | ||
| avatar?: string | null; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check nullable avatar usage patterns in ReviewSubmissionModal components.
rg -nP --type=tsx 'src=\{comment\.author\.avatar\}' components/organization/cards/ReviewSubmissionModal
rg -nP --type=tsx 'src=\{(member|voter)\.avatar\s*(\|\||\?\?)\s*undefined\}' components/organization/cards/ReviewSubmissionModalRepository: boundlessfi/boundless Length of output: 120 🏁 Script executed: #!/bin/bash
# First, explore the ReviewSubmissionModal directory structure
echo "=== Directory structure ==="
find components/organization/cards/ReviewSubmissionModal -type f | head -20
echo ""
echo "=== Search for avatar usage without type restriction ==="
rg -n 'src.*avatar' components/organization/cards/ReviewSubmissionModal
echo ""
echo "=== Search for comment.author.avatar specifically ==="
rg -n 'comment\.author\.avatar' components/organization/cards/ReviewSubmissionModal
echo ""
echo "=== Check types.ts file content ==="
cat -n components/organization/cards/ReviewSubmissionModal/types.tsRepository: boundlessfi/boundless Length of output: 3076 Fix avatar null-safety in SubmissionCommentsTab after type widening. After widening the Also applies to: 13-13, 24-24 🤖 Prompt for AI Agents |
||
| username?: string; | ||
| } | ||
|
|
||
| export interface Voter { | ||
| id: string; | ||
| name: string; | ||
| username: string; | ||
| avatar?: string; | ||
| avatar?: string | null; | ||
| votedAt?: string; | ||
| voteType?: 'positive' | 'negative'; | ||
| } | ||
|
|
@@ -21,7 +21,7 @@ export interface Comment { | |
| author: { | ||
| name: string; | ||
| username: string; | ||
| avatar?: string; | ||
| avatar?: string | null; | ||
| }; | ||
| createdAt: string; | ||
| reactions?: { | ||
|
|
||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: boundlessfi/boundless
Length of output: 92
🏁 Script executed:
Repository: boundlessfi/boundless
Length of output: 4586
🏁 Script executed:
Repository: boundlessfi/boundless
Length of output: 879
Remove
anycast in participant check.Line 42 uses
(p as any).userId, which drops type safety and is unnecessary since theParticipantinterface already definesuserIdas a direct property.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents