-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat/apply free #1050
Feat/apply free #1050
Conversation
… bookmarking behavior
WalkthroughThis pull request updates how issue interactions are handled across the system. The legacy prop and hook for contributions have been replaced with an issue-focused approach. Specifically, the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant M as Message Component
participant C as Chat Component
participant P as IssueSidepanel
U->>M: Click on an issue card
M->>C: Call onOpenIssue(issueId, projectId)
C->>C: Update issuePanel state & trigger button click
C->>P: Render IssueSidepanel with issueId, projectId
P->>P: Fetch & display issue details, manage application interactions
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Actionable comments posted: 3
🧹 Nitpick comments (30)
shared/features/issues/apply-counter/apply-counter.tsx (1)
9-9
: Function signature simplified by removing children propThe function no longer accepts children as a prop, which aligns with the component's focused purpose of displaying application count information. This is a breaking change for any components that were previously passing children to
ApplyCounter
.shared/panels/issue-sidepanel/issue-sidepanel.types.ts (2)
3-5
: Consider revising naming conventionThe naming pattern
issueSidepanelzodSchema
is somewhat inconsistent with typical naming conventions. Consider using a more standard approach likeissueSidepanelSchema
orissueSchema
.-export const issueSidepanelzodSchema = z.object({ +export const issueSidepanelSchema = z.object({ githubComment: z.string().min(1), });
7-7
: Update type reference if schema name changesIf you rename the schema constant, don't forget to update this reference as well.
-export type IssueSidepanelFormSchema = z.infer<typeof issueSidepanelzodSchema>; +export type IssueSidepanelFormSchema = z.infer<typeof issueSidepanelSchema>;app/(saas)/projects/[projectSlug]/overview/_features/available-issues/available-issues.tsx (1)
72-93
: Redundant key propThe
key
prop is applied redundantly to both the list item (li
) element and theIssueSidepanel
component. It's only necessary on the list item.<li key={issue.id}> - <IssueSidepanel key={issue.id} projectId={projectId} issueId={issue.id}> + <IssueSidepanel projectId={projectId} issueId={issue.id}> <buttonshared/panels/issue-sidepanel/_components/header/header.tsx (2)
25-29
: Add an accessible label to the back buttonThe back button has a clear visual icon but lacks an accessible label for screen readers. Consider adding an
aria-label
for better accessibility.- <Button variant="ghost" size="icon" className="shrink-0" onClick={onBack}> + <Button variant="ghost" size="icon" className="shrink-0" onClick={onBack} aria-label="Go back"> <ChevronLeft /> </Button>
31-31
: Add title attribute to truncated textSince you're using
line-clamp-1
to limit the title to one line, it would be helpful to add a title attribute so users can see the full text on hover when it's truncated.- <TypographyH4 className="line-clamp-1">{issueTitle}</TypographyH4> + <TypographyH4 className="line-clamp-1" title={issueTitle}>{issueTitle}</TypographyH4>shared/panels/issue-sidepanel/_components/summary/summay.tsx (4)
9-9
: Consider adding error handling for dynamic importThe dynamic import for the
Emoji
component doesn't include error handling. Consider adding a fallback in case the import fails.-const Emoji = dynamic(() => import("react-emoji-render")); +const Emoji = dynamic(() => import("react-emoji-render").catch(() => ({ default: ({ children }) => children })));
23-26
: Improve accessibility of Avatar componentAdd an
alt
attribute to the AvatarImage to improve accessibility.- <AvatarImage src={author.avatarUrl} /> + <AvatarImage src={author.avatarUrl} alt={`${author.login}'s avatar`} />
31-35
: Consider adding loading state for Markdown contentThe Markdown component might have some rendering delay, especially for larger content. Consider adding a loading state.
37-47
: Enhance label semanticsThe labels list could benefit from some semantic improvements. Consider adding an aria-label to the list.
- {labels ? ( - <ul className="flex flex-wrap items-center gap-2"> + {labels ? ( + <ul className="flex flex-wrap items-center gap-2" aria-label="Issue labels">shared/panels/issue-sidepanel/_components/metrics/metrics.tsx (3)
15-16
: Add error handling for date formattingThe date formatting logic doesn't include error handling for invalid date inputs. Consider adding a fallback or try/catch block.
- const dateKernelPort = bootstrap.getDateKernelPort(); - const openedSince = dateKernelPort.formatDistanceToNow(new Date(createdAt), { unit: "day", addSuffix: false }); + const dateKernelPort = bootstrap.getDateKernelPort(); + let openedSince; + try { + openedSince = dateKernelPort.formatDistanceToNow(new Date(createdAt), { unit: "day", addSuffix: false }); + } catch (error) { + console.error("Error formatting date:", error); + openedSince = "Unknown"; + }
18-34
: Consider responsive layout for mobile viewsThe current grid layout with 3 columns might not work well on smaller screens. Consider adding responsive classes to adjust the column count based on screen size.
- <div className="grid grid-cols-3 gap-3"> + <div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-3">
20-23
: Enhance accessibility with ARIA rolesConsider adding ARIA roles to the cards to improve accessibility and make their purpose clearer to screen readers.
- <Card className="flex flex-col gap-1 p-3"> + <Card className="flex flex-col gap-1 p-3" role="region" aria-label="Applicants count">Apply similar changes to the other card elements as well.
Also applies to: 25-28, 30-33
shared/ui/sheet.tsx (1)
119-124
: Simple and effective error state component.The SheetError component provides a clean fallback for error states. Consider enhancing it in the future to include error details or retry actions for a better user experience.
shared/panels/issue-sidepanel/_utils/utils.ts (3)
4-26
: Consider verifying parseInt logic and handle potential NaN.When converting
contribution.githubId
to a number, be aware thatparseInt
can returnNaN
. You might want to confirm upstream validations or add a fallback if invalid inputs are possible.
28-37
: Handle unknown statuses more gracefully.Defaulting to
"CANCELLED"
may be fine, but consider adding an"UNKNOWN"
or other fallback status to flag truly unexpected inputs.
39-88
: Potential improvement for random label generation.Maintaining a large array of strings here might hamper readability and i18n support. Consider moving the data into a separate config or resource file for easier management.
app/(saas)/od-say/_features/chat/chat.tsx (3)
24-24
: Consider avoiding programmatic ref clicks.Relying on a hidden button ref for sheet toggling can be less intuitive. A direct callback or a controlled
open
prop might simplify the flow.
31-33
: Using programmatic click to open the sheet.While this works, you could expose an API to open the panel directly and remove the extra DOM element.
135-137
: Embedding the trigger button as a child of IssueSidepanel.Consider controlling
open
via state to reduce the complexity of manually clicking a hidden trigger.shared/panels/issue-sidepanel/issue-sidepanel.tsx (4)
34-40
: IssueSidepanel: flexible approach for both issueId and contributionUuid.If both or neither props can be passed, be mindful of potential ambiguity. You might consider splitting them into distinct modes or ensuring only one is ever passed.
42-59
: Sheet usage looks correct.You might review accessibility details (focus management, ESC key handling) to ensure the side panel aligns with best practices.
62-189
: Dual fetching logic for issue and contribution.Merging data from two queries can be effective but be sure the fallback to
issueFromContribution
won’t cause confusion if both are valid or ifissueId
is 0. Consider more explicit error handling for missing or invalid inputs.
191-301
: Render logic and form submission flow.The CTA decisions, forms, and toasts are coherent. As a minor enhancement, handling edge cases (e.g., closed issues, maximum application limit) could be further emphasized in the UI.
shared/panels/issue-sidepanel/_components/apply-panel/apply-panel.tsx (6)
34-38
: Consider adding error handling for theonApply
callback.The
handleApply
function doesn't include any error handling. If theonApply
callback throws an error, it might preventsetOpen(false)
from being called, leaving the panel open unexpectedly.function handleApply() { capture("issue_sidepanel_apply_normal", { issue_id: issueId }); - onApply(); - setOpen(false); + try { + onApply(); + } catch (error) { + console.error("Error applying for issue:", error); + } finally { + setOpen(false); + } }
40-44
: Consider adding error handling for theonBookmark
callback.Similar to the
handleApply
function, thehandleBookmark
function should include error handling to ensure the panel always closes after the action is attempted.function handleBookmark() { capture("issue_sidepanel_apply_free", { issue_id: issueId }); - onBookmark(); - setOpen(false); + try { + onBookmark(); + } catch (error) { + console.error("Error bookmarking issue:", error); + } finally { + setOpen(false); + } }
113-117
: Consider adding loading state and proper fallback for external link.When clicking on "Get to work", the user is directed to an external URL. It's good practice to provide a loading state or feedback to the user, especially if the link may take time to load.
-<Button className="w-fit" onClick={handleBookmark} asChild> - <a href={issueUrl} target="_blank" rel="noopener noreferrer"> - <ArrowRight /> Get to work - </a> -</Button> +<Button + className="w-fit" + onClick={handleBookmark} + asChild +> + <a + href={issueUrl} + target="_blank" + rel="noopener noreferrer" + aria-label={`Work on issue #${issueNumber}: ${issueTitle}`} + > + <ArrowRight /> Get to work + </a> +</Button>
49-55
: Add aria-label to the header for better accessibility.The
Header
component should include an aria-label to improve accessibility for screen readers.<Header issueNumber={issueNumber} issueStatus={issueStatus} issueTitle={issueTitle} onBack={() => setOpen(false)} + aria-label={`Issue #${issueNumber} details`} />
1-11
: Consider organizing imports for better readability.The import statements could be better organized into groups: external libraries, internal components, and internal utilities.
-import { ArrowRight, CircleDotDashed, CircleEllipsis, CircleHelp, GitMerge } from "lucide-react"; -import { PropsWithChildren, useState } from "react"; - -import { ContributionGithubStatusUnion } from "@/core/domain/contribution/models/contribution.types"; - -import { Header } from "@/shared/panels/issue-sidepanel/_components/header/header"; -import { usePosthog } from "@/shared/tracking/posthog/use-posthog"; -import { Button } from "@/shared/ui/button"; -import { Card } from "@/shared/ui/card"; -import { Sheet, SheetContent, SheetTrigger } from "@/shared/ui/sheet"; -import { TypographyH3, TypographyMuted, TypographyP } from "@/shared/ui/typography"; +// External libraries +import { ArrowRight, CircleDotDashed, CircleEllipsis, CircleHelp, GitMerge } from "lucide-react"; +import { PropsWithChildren, useState } from "react"; + +// Domain models +import { ContributionGithubStatusUnion } from "@/core/domain/contribution/models/contribution.types"; + +// Components +import { Header } from "@/shared/panels/issue-sidepanel/_components/header/header"; +import { Button } from "@/shared/ui/button"; +import { Card } from "@/shared/ui/card"; +import { Sheet, SheetContent, SheetTrigger } from "@/shared/ui/sheet"; +import { TypographyH3, TypographyMuted, TypographyP } from "@/shared/ui/typography"; + +// Utilities +import { usePosthog } from "@/shared/tracking/posthog/use-posthog";
13-30
: Enhance component documentation with JSDoc.Adding JSDoc comments would improve the maintainability and discoverability of this component.
+/** + * ApplyPanel component provides an interface for users to apply for or bookmark issues. + * It offers two pathways for contributors: structured assignment or independent work. + * + * @param {Object} props - Component props + * @param {React.ReactNode} props.children - Trigger element for the sheet + * @param {number} props.issueId - The unique identifier for the issue + * @param {string} props.issueTitle - The title of the issue + * @param {number} props.issueNumber - The issue number + * @param {ContributionGithubStatusUnion} props.issueStatus - The current status of the issue + * @param {string} props.issueUrl - URL to the issue on GitHub + * @param {() => void} props.onApply - Callback function when user applies for assignment + * @param {() => void} props.onBookmark - Callback function when user chooses to work independently + */ export function ApplyPanel({ children, issueId, issueTitle, issueNumber, issueStatus, issueUrl, onApply, onBookmark, }: PropsWithChildren<{ issueId: number; issueTitle: string; issueNumber: number; issueStatus: ContributionGithubStatusUnion; issueUrl: string; onApply: () => void; onBookmark: () => void; }>) {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (23)
app/(saas)/od-say/_features/chat/_features/message/message.tsx
(2 hunks)app/(saas)/od-say/_features/chat/_features/message/message.types.ts
(1 hunks)app/(saas)/od-say/_features/chat/chat.tsx
(4 hunks)app/(saas)/od-say/page.tsx
(0 hunks)app/(saas)/osw/[hackathonSlug]/layout.tsx
(0 hunks)app/(saas)/osw/[hackathonSlug]/my-applications/page.tsx
(3 hunks)app/(saas)/projects/[projectSlug]/issues/page.tsx
(2 hunks)app/(saas)/projects/[projectSlug]/layout.tsx
(0 hunks)app/(saas)/projects/[projectSlug]/overview/_features/available-issues/available-issues.tsx
(2 hunks)app/(saas)/projects/[projectSlug]/overview/_features/good-first-issues/good-first-issues.tsx
(2 hunks)core/application/react-query-adapter/application/client/use-delete-application.ts
(1 hunks)shared/features/issues/apply-counter/apply-counter.tsx
(2 hunks)shared/features/issues/apply-counter/apply-counter.types.ts
(0 hunks)shared/features/issues/apply-issue-guideline/apply-issue-guideline.types.ts
(0 hunks)shared/panels/issue-sidepanel/_components/apply-panel/apply-panel.tsx
(1 hunks)shared/panels/issue-sidepanel/_components/github-comment/github-comment.tsx
(1 hunks)shared/panels/issue-sidepanel/_components/header/header.tsx
(1 hunks)shared/panels/issue-sidepanel/_components/metrics/metrics.tsx
(1 hunks)shared/panels/issue-sidepanel/_components/summary/summay.tsx
(1 hunks)shared/panels/issue-sidepanel/_utils/utils.ts
(1 hunks)shared/panels/issue-sidepanel/issue-sidepanel.tsx
(1 hunks)shared/panels/issue-sidepanel/issue-sidepanel.types.ts
(1 hunks)shared/ui/sheet.tsx
(3 hunks)
💤 Files with no reviewable changes (5)
- shared/features/issues/apply-issue-guideline/apply-issue-guideline.types.ts
- app/(saas)/od-say/page.tsx
- app/(saas)/osw/[hackathonSlug]/layout.tsx
- app/(saas)/projects/[projectSlug]/layout.tsx
- shared/features/issues/apply-counter/apply-counter.types.ts
🧰 Additional context used
🪛 ESLint
shared/panels/issue-sidepanel/_components/apply-panel/apply-panel.tsx
[error] 77-77: '
can be escaped with '
, ‘
, '
, ’
.
(react/no-unescaped-entities)
🔇 Additional comments (23)
shared/features/issues/apply-counter/apply-counter.tsx (3)
33-43
: Component structure simplified with direct return of UI elementsThe component now has a cleaner, more focused structure that directly returns the application count UI without nesting it with children. This change makes the component more reusable and single-purpose.
34-36
: Application count visibility enhanced with conditional stylingGood implementation of conditional styling to highlight when the user has reached their application limit, using red text to draw attention to this state.
38-42
: Progress bar effectively visualizes application usageThe progress bar provides a helpful visual indicator of application usage. The conditional styling for the progress bar (turning red when at limit) reinforces the state messaging in the text above.
core/application/react-query-adapter/application/client/use-delete-application.ts (1)
38-41
: Good addition for data consistencyAdding this query invalidation ensures that the user's information gets refreshed when they delete an application, preventing stale data from being displayed.
app/(saas)/osw/[hackathonSlug]/my-applications/page.tsx (1)
113-135
: Duplicate inconsistent prop namingSame inconsistency with
contributionUuid
vsissueId
as mentioned in the previous comment.app/(saas)/projects/[projectSlug]/overview/_features/available-issues/available-issues.tsx (1)
72-93
: Inconsistent prop naming between componentsYou're using
issueId
here, but in other components (likemy-applications.tsx
), the same property is namedcontributionUuid
. Standardize this across the codebase to avoid confusion and potential bugs.shared/panels/issue-sidepanel/_components/header/header.tsx (1)
11-35
: Overall implementation looks goodThe Header component is well-structured with proper typing, conditional rendering, and appropriate UI components. The layout is clean and should work well for displaying issue information.
app/(saas)/od-say/_features/chat/_features/message/message.types.ts (1)
17-17
:❓ Verification inconclusive
Update method signature looks good
The change from
onOpenContribution
toonOpenIssue
with the addition of aprojectId
parameter is a sensible improvement. This provides more context to the consumer and aligns well with the PR objectives.Ensure all component implementations using this interface are updated accordingly to pass both parameters.
🏁 Script executed:
#!/bin/bash # Search for implementations of the new onOpenIssue method to ensure proper usage rg "onOpenIssue\(" --type ts --type tsx -A 3 -B 3Length of output: 79
Attention: Manual Verification Required for onOpenIssue Implementations
The updated method signature—from
onOpenContribution
toonOpenIssue
with the addedprojectId
parameter—aligns well with the PR objectives. However, our initial search encountered an issue with the file type filtering (error: "unrecognized file type: tsx"). To ensure all component implementations have been updated accordingly, please verify that every usage of this interface now passes both parameters.
- Next Steps:
- Run the following commands to search separately in
.ts
and.tsx
files:echo "Searching in .ts files:" rg "onOpenIssue\(" --type ts -A 3 -B 3 || echo "No matches in .ts files" echo "Searching in .tsx files:" rg "onOpenIssue\(" --glob "*.tsx" -A 3 -B 3 || echo "No matches in .tsx files"- Review the output to ensure all instances of
onOpenIssue
have been updated.shared/panels/issue-sidepanel/_components/metrics/metrics.tsx (1)
6-36
: Good implementation of metrics componentThe Metrics component is well-structured and provides a clean, consistent way to display issue statistics. The three-card layout with distinct sections for applicants, comments, and age is intuitive and aligns well with common design patterns.
app/(saas)/projects/[projectSlug]/overview/_features/good-first-issues/good-first-issues.tsx (1)
86-107
: Clean implementation of the IssueSidepanel component!The refactoring from imperative side panel opening to a declarative component approach is a solid improvement. This pattern makes the component hierarchy clearer and encapsulates the panel opening/closing logic inside the
IssueSidepanel
component.app/(saas)/od-say/_features/chat/_features/message/message.tsx (2)
154-154
: Appropriate prop name change aligned with new issue-focused approach.The removal of
onOpenContribution
in favor ofonOpenIssue
aligns well with the overall shift toward an issue-focused approach mentioned in the PR summary.
200-204
: Good handling of potential undefined project ID.The implementation correctly handles the possibility of an undefined
contribution.project?.id
by providing an empty string fallback, ensuring the function always receives valid parameters.shared/panels/issue-sidepanel/_components/github-comment/github-comment.tsx (1)
9-33
: Well-structured form component with appropriate feedback.This component is well-implemented with:
- Proper form field structure
- Clear labeling and user feedback
- Conditional rendering based on application state
- Appropriate validation handling
The auto-focus attribute is a nice touch for improving the user experience.
shared/ui/sheet.tsx (3)
57-58
: Good extension of SheetContentProps with overlay customization.Adding
overlayProps
increases the flexibility of the Sheet component, allowing consumers to customize the overlay behavior and appearance as needed.
63-63
: Proper implementation of overlayProps spreading.The change correctly spreads the optional overlay props to the SheetOverlay component.
102-117
: Well-designed loading state component.The SheetLoading component provides a clean, consistent loading state with appropriate skeleton placeholders for header, content, and footer sections. This helps maintain layout stability during loading states.
app/(saas)/od-say/_features/chat/chat.tsx (4)
3-3
: No concerns with the updated import usage.
8-8
: Import of IssueSidepanel is fine.
23-23
: Stateful approach for issue panel management is straightforward.
76-77
: Handing off onOpenIssue to Message.This is consistent with the new approach, and it helps unify how issues are opened throughout the component tree.
app/(saas)/projects/[projectSlug]/issues/page.tsx (2)
21-21
: Import of IssueSidepanel is straightforward.
200-232
: Wrapping CardIssue with IssueSidepanel.This integration looks consistent. However, verify that
data?.id
isn't empty if the side panel relies on a valid project ID. Consider gracefully handling the case where project data is unavailable.shared/panels/issue-sidepanel/issue-sidepanel.tsx (1)
1-31
: Imports and definitions are comprehensive.All required dependencies are here. No immediate concerns.
<IssueSidepanel key={issue.id} projectId={issue.project?.id ?? ""} contributionUuid={issue.id}> | ||
<CardIssue | ||
title={issue.githubTitle} | ||
contribution={{ | ||
type: "ISSUE", | ||
githubStatus: issue.githubStatus, | ||
number: issue.githubNumber, | ||
}} | ||
createdAt={issue.createdAt} | ||
users={issue.applicants.map(a => ({ | ||
login: a.login, | ||
avatarUrl: a.avatarUrl, | ||
}))} | ||
createdBy={{ | ||
login: issue.githubAuthor.login, | ||
avatarUrl: issue.githubAuthor.avatarUrl, | ||
}} | ||
repo={{ | ||
name: issue.repo.name, | ||
url: issue.repo.htmlUrl, | ||
}} | ||
/> | ||
</IssueSidepanel> |
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.
💡 Verification agent
🧩 Analysis chain
Inconsistent prop naming between components
You're using contributionUuid
here, but in other components (like available-issues.tsx
), the same property is named issueId
. Consider using consistent prop naming across the codebase.
🏁 Script executed:
#!/bin/bash
# Find all instances of IssueSidepanel usage to check prop naming consistency
rg -n "IssueSidepanel.*\b(contributionUuid|issueId)\b" --type tsx --type jsx
Length of output: 106
I'm noticing that the initial search command failed to properly scan *.tsx files (due to the “unrecognized file type: tsx” error). To verify the naming consistency between components (i.e. using contributionUuid
in this file versus issueId
in, for example, available-issues.tsx
), please run the following updated script:
Once you verify that other components (like available-issues.tsx) use issueId
instead of contributionUuid
, please update this file accordingly to ensure consistent prop naming across the codebase.
Action Required:
• Verify the prop naming in all IssueSidepanel usages (especially in available-issues.tsx).
• Refactor either the prop in this file (page.tsx) or update the other components so that both use the same prop name.
🏁 Script executed:
#!/bin/bash
# Searching for IssueSidepanel usage with both naming conventions in .tsx and .jsx files
rg -n "IssueSidepanel.*(contributionUuid|issueId)" --glob "*.tsx" --glob "*.jsx"
Length of output: 1185
Consistent Prop Naming for IssueSidepanel
The codebase shows that the IssueSidepanel component is used with two different prop names—contributionUuid
in files such as app/(saas)/osw/[hackathonSlug]/my-applications/page.tsx
and in app/(saas)/od-say/_features/chat/chat.tsx
, versus issueId
in files like app/(saas)/projects/[projectSlug]/overview/_features/available-issues/available-issues.tsx
and others. This inconsistency can cause confusion and potential issues downstream.
Action Required:
- Confirm the correct prop name by reviewing the IssueSidepanel component’s definition.
- Refactor the code to consistently use one prop name (preferably
issueId
, as it is used in the majority of places) across all files. - Update the following usages accordingly:
app/(saas)/osw/[hackathonSlug]/my-applications/page.tsx
(currently usingcontributionUuid
)app/(saas)/od-say/_features/chat/chat.tsx
(currently passingissuePanel.issueId
viacontributionUuid
)- Verify other files for similar inconsistencies.
import dynamic from "next/dynamic"; | ||
|
||
import { Markdown } from "@/shared/features/markdown/markdown"; | ||
import { Avatar, AvatarFallback, AvatarImage } from "@/shared/ui/avatar"; | ||
import { Badge } from "@/shared/ui/badge"; | ||
import { Card } from "@/shared/ui/card"; | ||
import { TypographyP } from "@/shared/ui/typography"; | ||
|
||
const Emoji = dynamic(() => import("react-emoji-render")); |
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.
Fix typo in filename
The filename is misspelled as "summay.tsx" instead of "summary.tsx". This should be corrected to maintain consistency and prevent potential import issues.
✅ Clear direction from the maintainer | ||
<br /> | ||
✅ Structured support throughout | ||
<br />✅ Ensure you're on the right track before diving in |
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
Fix the unescaped entity in JSX.
React warns about unescaped entities in JSX. The apostrophe in "you're" should be escaped.
-<br />✅ Ensure you're on the right track before diving in
+<br />✅ Ensure you're on the right track before diving in
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
<br />✅ Ensure you're on the right track before diving in | |
<br />✅ Ensure you're on the right track before diving in |
🧰 Tools
🪛 ESLint
[error] 77-77: '
can be escaped with '
, ‘
, '
, ’
.
(react/no-unescaped-entities)
Summary by CodeRabbit
New Features
Refactor