-
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
refactor(work): migrate to custom page #435
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
apps/web/src/app/[locale]/realisations/blocks/products/index.tsxOops! Something went wrong! :( ESLint: 9.17.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@nerdfish/config' imported from /eslint.config.js WalkthroughThis pull request introduces significant changes to the web application's structure, focusing on internationalization, page rendering, and project portfolio presentation. The modifications span multiple files across different directories, including updates to page components, product and testimonial blocks, and internationalization dictionaries. The changes aim to improve the organization of locale-specific content, refactor component structures, and enhance the presentation of work and project information. Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (
|
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: 0
🧹 Nitpick comments (5)
apps/web/src/app/[locale]/realisations/blocks/products/index.tsx (1)
27-31
: Fix typo in className.There's a typo in the className prop of the GridCard component.
- <GridCard key={i} className="elative lg:col-span-1" asChild> + <GridCard key={i} className="relative lg:col-span-1" asChild>apps/web/src/app/[locale]/realisations/blocks/products/products-block.tsx (2)
15-19
: Consider consolidating data fetching logic.This function duplicates the data fetching logic from
ProductsOverviewData
in index.tsx. Consider extracting this into a shared hook or utility function.// Suggested shared utility: async function fetchProducts() { return product.getAll() }
49-49
: Fix typo in className.Same typo as found in index.tsx.
- <GridCard key={i} className="elative lg:col-span-1" asChild> + <GridCard key={i} className="relative lg:col-span-1" asChild>apps/web/src/app/[locale]/work/page.tsx (2)
25-27
: Consider using resolved type instead of Promise.The type definition could be more explicit about the resolved value.
-type PageProps = { - params: Promise<WithLocale> -} +type PageProps = { + params: WithLocale | Promise<WithLocale> +}
56-120
: Consider abstracting repeated section patterns.The component has multiple similar section patterns (WorkOverview + Cta). Consider creating a composite component to reduce repetition and improve maintainability.
Example abstraction:
type WorkSectionProps = { tags: string[] headerTranslationKey: string ctaTranslationKey: string } function WorkSection({ tags, headerTranslationKey, ctaTranslationKey }: WorkSectionProps) { const t = useTranslations('pages.work') return ( <> <Section> <WorkOverview tags={tags} header={{ title: t(`${headerTranslationKey}.title`), subtitle: t(`${headerTranslationKey}.subtitle`), }} /> </Section> <Section> <Cta title={t(`${ctaTranslationKey}.cta.title`)} subtitle={t(`${ctaTranslationKey}.cta.subtitle`)} link={{ href: '/contact', label: t(`${ctaTranslationKey}.cta.label`), }} /> </Section> </> ) }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
apps/web/src/app/[locale]/(tina)/work/page.tsx
(0 hunks)apps/web/src/app/[locale]/realisations/blocks/products/index.tsx
(1 hunks)apps/web/src/app/[locale]/realisations/blocks/products/products-block.tsx
(1 hunks)apps/web/src/app/[locale]/realisations/blocks/products/products.tsx
(1 hunks)apps/web/src/app/[locale]/testimonials/blocks/testimonials/index.tsx
(1 hunks)apps/web/src/app/[locale]/work/page.tsx
(1 hunks)apps/web/src/app/cms/blocks-renderer.tsx
(1 hunks)packages/i18n/dictionaries/en.json
(1 hunks)packages/i18n/dictionaries/nl.json
(1 hunks)
💤 Files with no reviewable changes (1)
- apps/web/src/app/[locale]/(tina)/work/page.tsx
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Lint
- GitHub Check: TypeCheck
- GitHub Check: E2E
🔇 Additional comments (9)
apps/web/src/app/[locale]/realisations/blocks/products/index.tsx (2)
9-12
: LGTM! Good type definition.The
ProductsOverviewProps
type correctly omits theproducts
prop fromProductsOverviewContentProps
, ensuring proper type safety and separation of concerns.
14-17
: LGTM! Clean data fetching implementation.Good separation of concerns by isolating data fetching in
ProductsOverviewData
. This makes the code more maintainable and testable.apps/web/src/app/[locale]/testimonials/blocks/testimonials/index.tsx (1)
14-14
: LGTM! Enhanced filtering capability.Good enhancement to allow filtering by multiple testimonial types. The implementation correctly uses array includes for filtering.
apps/web/src/app/[locale]/realisations/blocks/products/products-block.tsx (1)
34-37
: Verify link availability.The CTA button uses a fallback empty string when link is undefined. Consider adding a condition to hide the CTA when no link is provided.
apps/web/src/app/[locale]/realisations/blocks/products/products.tsx (1)
103-109
: LGTM! Clear naming and good implementation.The renaming of
ProductsOverview
toProductsOverviewContent
better reflects the component's responsibility. The implementation maintains good accessibility with proper ARIA attributes and semantic HTML.apps/web/src/app/[locale]/work/page.tsx (1)
1-23
: LGTM! Well-organized imports.The imports are properly structured and all dependencies are clearly defined.
apps/web/src/app/cms/blocks-renderer.tsx (1)
6-6
: LGTM! Import path updated correctly.The import path has been updated to reflect the new file structure.
packages/i18n/dictionaries/en.json (1)
220-252
: LGTM! Well-structured translations with comprehensive content.The translations are complete, well-organized, and align perfectly with the UI structure.
packages/i18n/dictionaries/nl.json (1)
220-252
: LGTM! Dutch translations are complete and natural.The translations maintain consistency with the English version while using natural Dutch language constructs.
Summary by CodeRabbit
New Features
Documentation
Refactor