Skip to content

Origin/actions auto#295

Merged
danielmarv merged 3 commits intonext-js-migrationfrom
origin/actions-auto
Mar 2, 2026
Merged

Origin/actions auto#295
danielmarv merged 3 commits intonext-js-migrationfrom
origin/actions-auto

Conversation

@danielmarv
Copy link
Member

This pull request introduces a new dynamic employee profile page and updates routing to improve the handling of team member profiles, specifically for Hendrik. The changes include implementing a locale-aware employee page, updating team data links, and redirecting the old "about-hendrik" route to the new structure.

Routing and Page Structure Updates:

Data and Linking Consistency:

  • Updated Hendrik’s entry in both team.json files to use the new /employees/hendrik link instead of /about-hendrik/. [1] [2]
  • Changed the import of Link in TeamCard.tsx to use the localized routing utility for better internationalization support.

Copilot AI review requested due to automatic review settings March 2, 2026 12:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new locale-aware, dynamic employee profile route and migrates existing “Hendrik” profile navigation to the new URL structure while keeping legacy links working via redirect.

Changes:

  • Added [locale]/employees/[slug] dynamic employee profile page with static params and metadata generation.
  • Updated team data links (EN/DE) to point to /employees/hendrik and switched TeamCard to use the locale-aware Link.
  • Introduced a legacy route handler at [locale]/about-hendrik that redirects to the new employee profile URL.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/data/en/team.json Updates Hendrik link to new /employees/hendrik path.
src/data/de/team.json Updates Hendrik link to new /employees/hendrik path.
src/components/about/TeamCard.tsx Switches to locale-aware Link to keep team profile links localized.
src/app/[locale]/employees/[slug]/page.tsx Adds the new dynamic employee profile page, static params, and metadata.
src/app/[locale]/about-hendrik/page.tsx Adds a legacy redirect from about-hendrik to the new employee route.
Comments suppressed due to low confidence (5)

src/app/[locale]/employees/[slug]/page.tsx:92

  • These two absolutely-positioned illustration images appear decorative, but they have non-empty alt text. For accessibility, decorative images should typically use alt="" (and optionally aria-hidden) so they aren’t announced by screen readers.
      <Image
        className="absolute hidden lg:block lg:right-[15%] lg:top-[25%]"
        alt="Circles"
        src="/illustrations/circles.svg"
        width={100}
        height={100}
      />
      <Image
        className="absolute hidden lg:block lg:right-[31%] lg:top-[25%]"
        alt="Arrow"
        src="/illustrations/arrow-dashed.svg"
        width={100}
        height={100}
      />

src/app/[locale]/employees/[slug]/page.tsx:115

  • The profile image uses a generic alt text ("employee"). For accessibility and better UX, use a meaningful alt (e.g., the employee’s name) or an empty alt if the name is already conveyed and the image is purely decorative.
            <Image
              className="xl:w-77.5 xl:h-77.5 lg:w-66.25 lg:h-66.25 sm:w-77.5 sm:h-77.5 w-48.75 h-48.75 border border-purple rounded-full object-cover absolute top-[17%] xl:right-[10%] lg:right-[10.5%] sm:right-[9%] right-[11%]"
              alt="employee"
              src={member.picture}
              width={310}

src/app/[locale]/about-hendrik/page.tsx:10

  • New routing behavior is introduced here (new dynamic employee page and legacy redirect), but there are no corresponding Playwright e2e assertions. Adding e2e coverage for /employees/:slug (EN unprefixed + DE prefixed) and /about-hendrik redirect would help prevent regressions, especially with localePrefix: 'as-needed' behavior.
import { redirect } from 'next/navigation'

export default async function AboutHendrikPage({
  params,
}: {
  params: Promise<{ locale: string }>
}) {
  const { locale } = await params
  redirect(`/${locale}/employees/hendrik`)
}

src/app/[locale]/about-hendrik/page.tsx:9

  • The redirect hard-codes the locale segment (e.g. /en/...). With localePrefix: 'as-needed' in the routing config, the default locale should generally not be prefixed. Consider using the i18n navigation helper (redirect from @/i18n/routing) or building the target URL so that en redirects to /employees/hendrik while de redirects to /de/employees/hendrik.
import { redirect } from 'next/navigation'

export default async function AboutHendrikPage({
  params,
}: {
  params: Promise<{ locale: string }>
}) {
  const { locale } = await params
  redirect(`/${locale}/employees/hendrik`)

src/app/[locale]/employees/[slug]/page.tsx:30

  • generateStaticParams hard-codes the locale list as ['en', 'de']. Since the app already centralizes supported locales in routing.locales, using that source here avoids stale builds if locales are added/removed later and keeps behavior consistent with src/app/[locale]/layout.tsx.
export async function generateStaticParams() {
  const slugs = Array.from(new Set([...teamDataEn, ...teamDataDe].map((member) => member.id)))

  return ['en', 'de'].flatMap((locale) =>
    slugs.map((slug) => ({
      locale,
      slug,
    }))
  )

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Daniel Ntege <danientege785@gmail.com>
Signed-off-by: Daniel Ntege <danientege785@gmail.com>
Signed-off-by: Daniel Ntege <danientege785@gmail.com>
@danielmarv danielmarv force-pushed the origin/actions-auto branch from be718ef to b63f4bc Compare March 2, 2026 13:18
@danielmarv danielmarv merged commit e805736 into next-js-migration Mar 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants