-
Notifications
You must be signed in to change notification settings - Fork 24
refactor/replacing react fc #426
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
base: main
Are you sure you want to change the base?
Conversation
…ure instead of React.FC
WalkthroughA systematic refactoring removes explicit Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes Areas requiring attention:
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
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: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/blocks/ticket-recent/src/frontend/TicketRecent.client.tsx (1)
22-26: Handle undefined case in string concatenation.If
extractedContentis undefined, the optional chaining on line 25 returnsundefined, which then concatenates with'...'to produce the string"undefined...".Apply this diff:
function extractFirst(content: string) { const match = content.match(/<p>([\s\S]*?)<\/p>/); const extractedContent = match ? match[1] : content; - return extractedContent?.slice(0, 90) + '...'; + return (extractedContent || '').slice(0, 90) + '...'; }
🧹 Nitpick comments (11)
packages/blocks/ticket-summary/src/frontend/TicketSummary.client.tsx (1)
17-17: Change away fromReact.FClooks good; verify children typing and consider simplifying parameter.Moving from
React.FC<TicketSummaryPureProps>to an inline parameter type is fine and keeps the component’s runtime behavior unchanged, assumingTicketSummaryPurePropsalready encodes everything you need (includingchildrenif it’s ever passed). Also, since you only usecomponentas an object, you could simplify the signature toexport const TicketSummaryPure = (component: TicketSummaryPureProps) => { ... }and drop the{ ...component }rest spread.packages/blocks/ticket-list/src/frontend/TicketList.server.tsx (1)
10-17: LGTM! Refactoring correctly removes React.FC.The function signature correctly implements the refactoring pattern by removing
React.FCand applying inline prop typing. All props are properly destructured and type-annotated.For enhanced API clarity, consider adding an explicit return type annotation:
-export const TicketListServer = async ({ +export const TicketListServer = async ({ id, accessToken, locale, routing, hasPriority, isDraftModeEnabled, -}: TicketListProps) => { +}: TicketListProps): Promise<JSX.Element | null> => {packages/blocks/notification-list/src/frontend/NotificationList.renderer.tsx (1)
9-31: React.FC removal looks good; check props surface and consider explicit return typeThe refactor to type props on the parameter instead of via
React.FCpreserves runtime behavior and keeps the component signature clear. One thing to double‑check is thatNotificationListRendererPropsstill matches how this component is used at call sites (especially if anything relied on the implicitchildrenprop fromReact.FC). You may also optionally add an explicit return type (: JSX.Element) on this exported component to keep its public type stable over time, but inference is fine if you prefer it.packages/blocks/category/src/frontend/Category.server.tsx (1)
11-45: Return type annotation would add clarity for async server componentsThe refactor to remove
React.FCis correct. SinceCategoryPropshas never included achildrenproperty, this change has no impact on children behavior.For consistency with async server component patterns, consider adding an explicit return type:
-export const Category = async ({ - id, - slug, - accessToken, - locale, - routing, - renderBlocks, - hasPriority, -}: CategoryProps) => { +export const Category = async ({ + id, + slug, + accessToken, + locale, + routing, + renderBlocks, + hasPriority, +}: CategoryProps): Promise<JSX.Element | null> => {This is optional but improves type clarity.
packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx (1)
18-18: Removal ofReadonlywrapper on props.The
Readonlywrapper has been removed from the props type. While this is consistent with the broader refactoring pattern, ensure that the props type definition (NotificationDetailsPureProps) already enforces immutability if needed, or confirm that removingReadonlyaligns with the project's type safety standards.TypeScript Readonly utility type best practices for React propspackages/blocks/notification-summary/src/frontend/NotificationSummary.client.tsx (1)
17-65: NotificationSummaryPure React.FC removal looks correctMoving the props type to the parameter and dropping
React.FCpreserves behavior here; the component still only reads frominfoCards/layoutand returnsnullwhen there are no cards. If you still want to enforce immutability at the type level (as withReadonly<NotificationSummaryPureProps>before), you could wrap the parameter type inReadonly<>, but it’s optional.packages/blocks/payments-history/src/frontend/PaymentsHistory.client.tsx (1)
15-27: Signature refactor is correct; consider simplifying destructuringThe inline props typing matches
PaymentsHistoryPurePropsand preserves behavior. You can simplify by destructuring directly in the parameter and drop the extra spread/object allocation:-export const PaymentsHistoryPure = ({ ...component }: PaymentsHistoryPureProps) => { - const { chartData, labels, title, currency } = component; +export const PaymentsHistoryPure = ({ chartData, labels, title, currency }: PaymentsHistoryPureProps) => {apps/docs/src/components/GuidesSection/index.tsx (1)
34-87: Inline props typing looks good; optional key improvementThe new inline-typed signature is consistent with
GuidesSectionPropsand keeps behavior unchanged.As a small follow-up, if
guide.title(or another stable identifier) is unique, consider using it instead ofindexas the React key to avoid potential reordering issues:- {guides.map((guide, index) => ( - <li key={index}> + {guides.map((guide) => ( + <li key={guide.title}>packages/blocks/article-list/src/frontend/ArticleList.renderer.tsx (1)
9-52: ArticleListRenderer props typing is correct; verify unusedslugpropThe inline-typed signature for
ArticleListRendereris consistent with the props it actually uses (id,accessToken,routing,hasPriority,isDraftModeEnabled), and behavior is unchanged.Given
ArticleListRendererPropsalso defines aslug: string[](seeArticleList.types.ts), consider either wiringslugthrough if it’s needed or removing it from the interface to avoid dead props.apps/docs/src/components/HomepageBenefitsSection/index.tsx (1)
14-22: Benefit: clean React.FC removal; consider tidying unused propThe move to
const Benefit = ({ ... }: BenefitProps) => (keeps behavior unchanged and removes the React.FC generic, which is consistent with the PR’s goals.
BenefitPropsstill declaresreverse?: booleanbut it isn’t used in the component. If it’s no longer needed, consider removing it from the interface; otherwise, wire it into layout/styles so consumers get the expected effect.apps/docs/src/components/Tile/index.tsx (1)
9-17: Tile/TileGroup: props typing is surprising; consider separating concernsThe React.FC removal itself is fine, but the current typings are odd:
TilePropsrequirestitleand constrainschildrentostring.TileGroupreusesTilePropsbut only needschildren, forcing callers to pass an unusedtitleand (by type) string children, even though this wrapper is likely meant to hold<Tile>elements.To make usage clearer and less restrictive, consider:
interface TileProps { - title: string; - icon?: string; - children: string; + title: string; + icon?: string; + children: React.ReactNode; } +interface TileGroupProps { + children: React.ReactNode; +} + -export const Tile = ({ title, children, icon }: TileProps) => ( +export const Tile = ({ title, children, icon }: TileProps) => ( ... ); -export const TileGroup = ({ children }: TileProps) => <div className="grid grid-cols-2 gap-4 w-full">{children}</div>; +export const TileGroup = ({ children }: TileGroupProps) => ( + <div className="grid grid-cols-2 gap-4 w-full">{children}</div> +);This keeps the runtime behavior as-is while aligning the types with expected usage.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (107)
apps/docs/src/components/Accordion/index.tsx(3 hunks)apps/docs/src/components/Badge/index.tsx(1 hunks)apps/docs/src/components/BadgeList/index.tsx(1 hunks)apps/docs/src/components/BenefitsSection/index.tsx(2 hunks)apps/docs/src/components/Card/index.tsx(1 hunks)apps/docs/src/components/ClientsSection/index.tsx(1 hunks)apps/docs/src/components/DXPFeaturesSection/index.tsx(1 hunks)apps/docs/src/components/DXPIntegrationsSection/index.tsx(1 hunks)apps/docs/src/components/DXPUseCasesSection/index.tsx(1 hunks)apps/docs/src/components/FeatureTile/index.tsx(2 hunks)apps/docs/src/components/FooterSection/index.tsx(1 hunks)apps/docs/src/components/GuidesSection/index.tsx(1 hunks)apps/docs/src/components/HomepageBenefitsSection/index.tsx(1 hunks)apps/docs/src/components/HomepageFeaturesSection/index.tsx(2 hunks)apps/docs/src/components/HomepageStartersSection/index.tsx(1 hunks)apps/docs/src/components/HoverCard/index.tsx(1 hunks)apps/docs/src/components/HubspotForm/index.tsx(1 hunks)apps/docs/src/components/SubscribeSection/index.tsx(1 hunks)apps/docs/src/components/Tile/index.tsx(1 hunks)apps/frontend/src/containers/Auth/AuthLayout/AuthLayout.tsx(1 hunks)apps/frontend/src/containers/Auth/SignInForm/SignInForm.tsx(1 hunks)apps/frontend/src/containers/Auth/Toolbar/LocaleSwitcher.tsx(1 hunks)apps/frontend/src/containers/ContextSwitcher/ContextSwitcher.tsx(1 hunks)apps/frontend/src/containers/Footer/Footer.tsx(1 hunks)apps/frontend/src/containers/Header/Header.tsx(1 hunks)apps/frontend/src/templates/OneColumnTemplate/OneColumnTemplate.tsx(1 hunks)apps/frontend/src/templates/PageTemplate/PageTemplate.tsx(1 hunks)apps/frontend/src/templates/TwoColumnTemplate/TwoColumnTemplate.tsx(1 hunks)packages/blocks/article-list/src/frontend/ArticleList.client.tsx(1 hunks)packages/blocks/article-list/src/frontend/ArticleList.renderer.tsx(1 hunks)packages/blocks/article-list/src/frontend/ArticleList.server.tsx(1 hunks)packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx(1 hunks)packages/blocks/article-search/src/frontend/ArticleSearch.renderer.tsx(1 hunks)packages/blocks/article-search/src/frontend/ArticleSearch.server.tsx(1 hunks)packages/blocks/article/src/frontend/Article.client.tsx(1 hunks)packages/blocks/article/src/frontend/Article.renderer.tsx(1 hunks)packages/blocks/article/src/frontend/Article.server.tsx(1 hunks)packages/blocks/category-list/src/frontend/CategoryList.client.tsx(1 hunks)packages/blocks/category-list/src/frontend/CategoryList.renderer.tsx(1 hunks)packages/blocks/category-list/src/frontend/CategoryList.server.tsx(1 hunks)packages/blocks/category/src/frontend/Category.client.tsx(1 hunks)packages/blocks/category/src/frontend/Category.renderer.tsx(1 hunks)packages/blocks/category/src/frontend/Category.server.tsx(1 hunks)packages/blocks/category/src/frontend/CategoryBlocks.tsx(1 hunks)packages/blocks/faq/src/frontend/Faq.client.tsx(1 hunks)packages/blocks/faq/src/frontend/Faq.renderer.tsx(1 hunks)packages/blocks/faq/src/frontend/Faq.server.tsx(1 hunks)packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.client.tsx(1 hunks)packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.renderer.tsx(1 hunks)packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.server.tsx(1 hunks)packages/blocks/invoice-list/src/frontend/InvoiceList.client.tsx(1 hunks)packages/blocks/invoice-list/src/frontend/InvoiceList.renderer.tsx(1 hunks)packages/blocks/invoice-list/src/frontend/InvoiceList.server.tsx(1 hunks)packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx(1 hunks)packages/blocks/notification-details/src/frontend/NotificationDetails.renderer.tsx(1 hunks)packages/blocks/notification-details/src/frontend/NotificationDetails.server.tsx(1 hunks)packages/blocks/notification-list/src/frontend/NotificationList.client.tsx(1 hunks)packages/blocks/notification-list/src/frontend/NotificationList.renderer.tsx(1 hunks)packages/blocks/notification-list/src/frontend/NotificationList.server.tsx(1 hunks)packages/blocks/notification-summary/src/frontend/NotificationSummary.client.tsx(1 hunks)packages/blocks/notification-summary/src/frontend/NotificationSummary.renderer.tsx(1 hunks)packages/blocks/notification-summary/src/frontend/NotificationSummary.server.tsx(1 hunks)packages/blocks/order-details/src/frontend/OrderDetails.client.tsx(2 hunks)packages/blocks/order-details/src/frontend/OrderDetails.renderer.tsx(1 hunks)packages/blocks/order-details/src/frontend/OrderDetails.server.tsx(1 hunks)packages/blocks/order-list/src/frontend/OrderList.client.tsx(1 hunks)packages/blocks/order-list/src/frontend/OrderList.renderer.tsx(1 hunks)packages/blocks/order-list/src/frontend/OrderList.server.tsx(1 hunks)packages/blocks/orders-summary/src/frontend/OrdersSummary.client.tsx(2 hunks)packages/blocks/orders-summary/src/frontend/OrdersSummary.renderer.tsx(1 hunks)packages/blocks/orders-summary/src/frontend/OrdersSummary.server.tsx(1 hunks)packages/blocks/payments-history/src/frontend/PaymentsHistory.client.tsx(1 hunks)packages/blocks/payments-history/src/frontend/PaymentsHistory.renderer.tsx(1 hunks)packages/blocks/payments-history/src/frontend/PaymentsHistory.server.tsx(1 hunks)packages/blocks/payments-summary/src/frontend/PaymentsSummary.client.tsx(1 hunks)packages/blocks/payments-summary/src/frontend/PaymentsSummary.renderer.tsx(1 hunks)packages/blocks/payments-summary/src/frontend/PaymentsSummary.server.tsx(1 hunks)packages/blocks/quick-links/src/frontend/QuickLinks.client.tsx(1 hunks)packages/blocks/quick-links/src/frontend/QuickLinks.renderer.tsx(1 hunks)packages/blocks/quick-links/src/frontend/QuickLinks.server.tsx(1 hunks)packages/blocks/service-details/src/frontend/ServiceDetails.client.tsx(1 hunks)packages/blocks/service-details/src/frontend/ServiceDetails.renderer.tsx(1 hunks)packages/blocks/service-details/src/frontend/ServiceDetails.server.tsx(1 hunks)packages/blocks/service-list/src/frontend/ServiceList.client.tsx(1 hunks)packages/blocks/service-list/src/frontend/ServiceList.renderer.tsx(1 hunks)packages/blocks/service-list/src/frontend/ServiceList.server.tsx(1 hunks)packages/blocks/surveyjs-form/src/frontend/SurveyJs.client.tsx(1 hunks)packages/blocks/surveyjs-form/src/frontend/SurveyJs.renderer.tsx(1 hunks)packages/blocks/surveyjs-form/src/frontend/SurveyJs.server.tsx(1 hunks)packages/blocks/ticket-details/src/frontend/TicketDetails.client.tsx(1 hunks)packages/blocks/ticket-details/src/frontend/TicketDetails.renderer.tsx(1 hunks)packages/blocks/ticket-details/src/frontend/TicketDetails.server.tsx(1 hunks)packages/blocks/ticket-list/src/frontend/TicketList.client.tsx(1 hunks)packages/blocks/ticket-list/src/frontend/TicketList.renderer.tsx(1 hunks)packages/blocks/ticket-list/src/frontend/TicketList.server.tsx(1 hunks)packages/blocks/ticket-recent/src/frontend/TicketRecent.client.tsx(1 hunks)packages/blocks/ticket-recent/src/frontend/TicketRecent.renderer.tsx(1 hunks)packages/blocks/ticket-recent/src/frontend/TicketRecent.server.tsx(1 hunks)packages/blocks/ticket-summary/src/frontend/TicketSummary.client.tsx(1 hunks)packages/blocks/ticket-summary/src/frontend/TicketSummary.renderer.tsx(1 hunks)packages/blocks/ticket-summary/src/frontend/TicketSummary.server.tsx(1 hunks)packages/blocks/user-account/src/frontend/UserAccount.client.tsx(1 hunks)packages/blocks/user-account/src/frontend/UserAccount.renderer.tsx(1 hunks)packages/blocks/user-account/src/frontend/UserAccount.server.tsx(1 hunks)packages/modules/surveyjs/src/frontend/Components/Fieldset/Fieldset.tsx(1 hunks)packages/modules/surveyjs/src/frontend/Questions/CustomSurveyQuestionText.tsx(1 hunks)packages/modules/surveyjs/src/frontend/Survey.tsx(1 hunks)
⛔ Files not processed due to max files limit (33)
- packages/ui/src/components/ActionList/ActionList.tsx
- packages/ui/src/components/AppSpinner/AppSpinner.stories.tsx
- packages/ui/src/components/AppSpinner/AppSpinner.tsx
- packages/ui/src/components/Author/Author.tsx
- packages/ui/src/components/Breadcrumbs/Breadcrumbs.tsx
- packages/ui/src/components/Cards/BlogCard/BlogCard.tsx
- packages/ui/src/components/Cards/FeatureCard/FeatureCard.tsx
- packages/ui/src/components/Cards/InfoCard/InfoCard.tsx
- packages/ui/src/components/Cards/InformativeCard/InformativeCard.tsx
- packages/ui/src/components/Cards/PricingCard/PricingCard.tsx
- packages/ui/src/components/Cards/ProductCard/ProductCard.tsx
- packages/ui/src/components/Carousel/Carousel.tsx
- packages/ui/src/components/Chart/ChartRoundedBar/ChartRoundedBar.tsx
- packages/ui/src/components/Chart/ChartTooltip/ChartTooltip.tsx
- packages/ui/src/components/Chart/DoubleLineChart/DoubleLineChart.tsx
- packages/ui/src/components/Chart/StackedBarChart/StackedBarChart.tsx
- packages/ui/src/components/Container/Container.tsx
- packages/ui/src/components/ContentSection/ContentSection.tsx
- packages/ui/src/components/DynamicIcon/DynamicIcon.tsx
- packages/ui/src/components/ErrorPage/ErrorPage.tsx
- packages/ui/src/components/Image/Image.tsx
- packages/ui/src/components/LinkList/LinkList.tsx
- packages/ui/src/components/Loading/Loading.tsx
- packages/ui/src/components/NoResults/NoResults.tsx
- packages/ui/src/components/Pagination/Pagination.stories.tsx
- packages/ui/src/components/Pagination/Pagination.tsx
- packages/ui/src/components/RichText/RichText.tsx
- packages/ui/src/elements/link.tsx
- packages/ui/turbo/generators/templates/component.hbs
- packages/utils/frontend/src/models/link.ts
- turbo/generators/templates/block/frontend/client.hbs
- turbo/generators/templates/block/frontend/renderer.hbs
- turbo/generators/templates/block/frontend/server.hbs
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-14T14:24:34.907Z
Learnt from: marcinkrasowski
Repo: o2sdev/openselfservice PR: 357
File: packages/blocks/ticket-summary/src/frontend/TicketSummary.types.ts:14-16
Timestamp: 2025-11-14T14:24:34.907Z
Learning: In the openselfservice repository, the pattern `Omit<PropsType, ''>` in TypeScript type definitions is intentionally used as a template for future prop omissions, even though it currently does nothing. This convention is preferred for consistency across blocks, making it easier to add omissions when needed later.
Applied to files:
packages/blocks/order-list/src/frontend/OrderList.client.tsx
📚 Learning: 2025-11-13T15:35:13.879Z
Learnt from: marcinkrasowski
Repo: o2sdev/openselfservice PR: 348
File: packages/blocks/notification-summary/src/api-harmonization/notification-summary.service.ts:23-27
Timestamp: 2025-11-13T15:35:13.879Z
Learning: In the notification-summary block service (packages/blocks/notification-summary/src/api-harmonization/notification-summary.service.ts), the hardcoded limit of 1000 notifications when calling notificationService.getNotificationList() is intentional, as there is no server-side aggregation API available for fetching notification counts by priority.
Applied to files:
packages/blocks/notification-list/src/frontend/NotificationList.server.tsx
🧬 Code graph analysis (33)
apps/frontend/src/containers/Auth/Toolbar/LocaleSwitcher.tsx (1)
apps/frontend/src/containers/Auth/Toolbar/Toolbar.types.ts (1)
ToolbarProps(1-6)
packages/blocks/faq/src/frontend/Faq.renderer.tsx (1)
packages/blocks/faq/src/frontend/Faq.types.ts (1)
FaqRendererProps(16-18)
packages/blocks/notification-summary/src/frontend/NotificationSummary.server.tsx (2)
packages/blocks/notification-summary/src/frontend/index.ts (1)
NotificationSummary(2-2)packages/blocks/notification-summary/src/frontend/NotificationSummary.types.ts (1)
NotificationSummaryProps(5-10)
apps/frontend/src/containers/Auth/SignInForm/SignInForm.tsx (1)
apps/frontend/src/containers/Auth/SignInForm/SignInForm.types.ts (1)
SignInFormProps(12-37)
apps/frontend/src/containers/Header/Header.tsx (2)
packages/integrations/strapi-cms/generated/strapi.ts (1)
Header(1921-1938)apps/frontend/src/containers/Header/Header.types.ts (1)
HeaderProps(5-11)
apps/frontend/src/containers/ContextSwitcher/ContextSwitcher.tsx (1)
apps/frontend/src/containers/ContextSwitcher/ContextSwitcher.types.ts (1)
ContextSwitcherProps(3-5)
packages/blocks/category-list/src/frontend/CategoryList.renderer.tsx (1)
packages/blocks/category-list/src/frontend/CategoryList.types.ts (1)
CategoryListProps(5-12)
packages/blocks/faq/src/frontend/Faq.client.tsx (1)
packages/blocks/faq/src/frontend/Faq.types.ts (1)
FaqPureProps(14-14)
apps/docs/src/components/Badge/index.tsx (1)
packages/framework/src/utils/models/badge.ts (1)
Badge(1-4)
packages/blocks/notification-summary/src/frontend/NotificationSummary.renderer.tsx (2)
packages/blocks/notification-summary/src/frontend/index.ts (1)
NotificationSummaryRenderer(3-3)packages/blocks/notification-summary/src/frontend/NotificationSummary.types.ts (1)
NotificationSummaryRendererProps(14-16)
packages/blocks/article-list/src/frontend/ArticleList.renderer.tsx (1)
packages/blocks/article-list/src/frontend/ArticleList.types.ts (1)
ArticleListRendererProps(16-18)
packages/blocks/quick-links/src/frontend/QuickLinks.client.tsx (1)
packages/blocks/quick-links/src/frontend/QuickLinks.types.ts (1)
QuickLinksPureProps(14-14)
packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.renderer.tsx (2)
packages/blocks/order-list/src/frontend/OrderList.renderer.tsx (2)
Renderer(9-17)Renderer(19-19)packages/blocks/service-list/src/frontend/ServiceList.renderer.tsx (1)
Renderer(9-34)
packages/blocks/order-list/src/frontend/OrderList.renderer.tsx (2)
packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.renderer.tsx (1)
Renderer(10-31)packages/blocks/service-list/src/frontend/ServiceList.renderer.tsx (1)
Renderer(9-34)
packages/blocks/category-list/src/frontend/CategoryList.client.tsx (1)
packages/blocks/category-list/src/frontend/CategoryList.types.ts (1)
CategoryListPureProps(14-14)
apps/frontend/src/templates/OneColumnTemplate/OneColumnTemplate.tsx (1)
apps/frontend/src/templates/OneColumnTemplate/OneColumnTemplate.types.ts (1)
OneColumnTemplateProps(3-6)
packages/blocks/ticket-summary/src/frontend/TicketSummary.server.tsx (2)
packages/blocks/ticket-summary/src/frontend/index.ts (1)
TicketSummary(2-2)packages/blocks/ticket-summary/src/frontend/TicketSummary.types.ts (1)
TicketSummaryProps(5-10)
packages/blocks/ticket-list/src/frontend/TicketList.server.tsx (1)
packages/blocks/ticket-list/src/frontend/TicketList.types.ts (1)
TicketListProps(5-12)
apps/frontend/src/templates/PageTemplate/PageTemplate.tsx (1)
apps/frontend/src/templates/PageTemplate/PageTemplate.types.ts (1)
PageTemplateProps(3-6)
packages/blocks/quick-links/src/frontend/QuickLinks.renderer.tsx (1)
packages/blocks/quick-links/src/frontend/QuickLinks.types.ts (1)
QuickLinksRendererProps(16-18)
packages/blocks/ticket-list/src/frontend/TicketList.client.tsx (1)
packages/blocks/ticket-list/src/frontend/TicketList.types.ts (1)
TicketListPureProps(14-14)
packages/blocks/article-list/src/frontend/ArticleList.server.tsx (1)
packages/blocks/article-list/src/frontend/ArticleList.types.ts (1)
ArticleListProps(5-12)
packages/blocks/ticket-list/src/frontend/TicketList.renderer.tsx (1)
packages/blocks/ticket-list/src/frontend/TicketList.types.ts (1)
TicketListRendererProps(16-18)
apps/docs/src/components/Accordion/index.tsx (1)
packages/ui/src/elements/accordion.tsx (2)
AccordionTrigger(59-59)AccordionContent(59-59)
packages/blocks/category-list/src/frontend/CategoryList.server.tsx (1)
packages/blocks/category-list/src/frontend/CategoryList.types.ts (1)
CategoryListProps(5-12)
apps/docs/src/components/HomepageFeaturesSection/index.tsx (1)
packages/ui/src/components/Cards/PricingCard/PricingCard.types.ts (1)
FeatureItemProps(19-19)
packages/blocks/notification-details/src/frontend/NotificationDetails.renderer.tsx (1)
packages/blocks/faq/src/frontend/Faq.types.ts (1)
FaqRendererProps(16-18)
packages/blocks/order-details/src/frontend/OrderDetails.client.tsx (1)
packages/framework/src/modules/orders/orders.model.ts (2)
Orders(84-84)OrderStatus(5-12)
packages/blocks/article-list/src/frontend/ArticleList.client.tsx (1)
packages/blocks/article-list/src/frontend/ArticleList.types.ts (1)
ArticleListPureProps(14-14)
packages/blocks/service-list/src/frontend/ServiceList.renderer.tsx (2)
packages/blocks/featured-service-list/src/frontend/FeaturedServiceList.renderer.tsx (1)
Renderer(10-31)packages/blocks/order-list/src/frontend/OrderList.renderer.tsx (2)
Renderer(9-17)Renderer(19-19)
packages/blocks/ticket-summary/src/frontend/TicketSummary.client.tsx (2)
packages/blocks/ticket-summary/src/frontend/index.ts (1)
TicketSummaryPure(1-1)packages/blocks/ticket-summary/src/frontend/TicketSummary.types.ts (1)
TicketSummaryPureProps(12-12)
apps/frontend/src/templates/TwoColumnTemplate/TwoColumnTemplate.tsx (1)
apps/frontend/src/templates/TwoColumnTemplate/TwoColumnTemplate.types.ts (1)
TwoColumnTemplateProps(3-6)
packages/blocks/faq/src/frontend/Faq.server.tsx (1)
packages/blocks/faq/src/frontend/Faq.types.ts (1)
FaqProps(5-12)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: deploy-preview
| routing, | ||
| hasPriority, | ||
| }) => { | ||
| export const NotificationDetailsRenderer = ({ slug, id, accessToken, routing, hasPriority }: FaqRendererProps) => { |
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.
Wrong type annotation on component.
The NotificationDetailsRenderer component uses FaqRendererProps as its type, which is inconsistent with the component name and file location. This should use the correct NotificationDetails-related props type.
Apply this diff if the type should be renamed:
-export const NotificationDetailsRenderer = ({ slug, id, accessToken, routing, hasPriority }: FaqRendererProps) => {
+export const NotificationDetailsRenderer = ({ slug, id, accessToken, routing, hasPriority }: NotificationDetailsRendererProps) => {Also update the import on line 8:
-import { FaqRendererProps } from './NotificationDetails.types';
+import { NotificationDetailsRendererProps } from './NotificationDetails.types';Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In
packages/blocks/notification-details/src/frontend/NotificationDetails.renderer.tsx
around line 10, the component is incorrectly typed as FaqRendererProps; change
the component props type to the appropriate NotificationDetails props type
(e.g., NotificationDetailsProps) and update the import on line 8 to import that
NotificationDetails props type instead of FaqRendererProps so the component
signature and import match the notification-details domain.
… feature/replacing-react-fc
What does this PR do?
Key Changes
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.