From cd81ea7c46602f11a6dbbf8d886af582baaf1dfa Mon Sep 17 00:00:00 2001 From: Cyril Date: Mon, 20 Jul 2026 11:21:40 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(frontend)=20extract=20getTra?= =?UTF-8?q?ckKey=20to=20shared=20layout=20utils?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move track key helper out of pip so layouts can reuse it. --- .../pipTrackSelection.ts => layout/utils/trackSelection.ts} | 0 .../src/features/pip/components/layout/PipGridLayout.tsx | 2 +- .../src/features/pip/components/layout/PipScreenShareLayout.tsx | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/frontend/src/features/{pip/utils/pipTrackSelection.ts => layout/utils/trackSelection.ts} (100%) diff --git a/src/frontend/src/features/pip/utils/pipTrackSelection.ts b/src/frontend/src/features/layout/utils/trackSelection.ts similarity index 100% rename from src/frontend/src/features/pip/utils/pipTrackSelection.ts rename to src/frontend/src/features/layout/utils/trackSelection.ts diff --git a/src/frontend/src/features/pip/components/layout/PipGridLayout.tsx b/src/frontend/src/features/pip/components/layout/PipGridLayout.tsx index 4b4afacb..9581c5f9 100644 --- a/src/frontend/src/features/pip/components/layout/PipGridLayout.tsx +++ b/src/frontend/src/features/pip/components/layout/PipGridLayout.tsx @@ -4,7 +4,7 @@ import { styled } from '@/styled-system/jsx' import { ParticipantTile } from '@/features/rooms/livekit/components/ParticipantTile' import { usePipElementSize } from '../../hooks/usePipElementSize' import { computePipGridLayout } from '../../utils/pipGrid' -import { getTrackKey } from '../../utils/pipTrackSelection' +import { getTrackKey } from '@/features/layout/utils/trackSelection' type PipGridLayoutProps = { tracks: TrackReferenceOrPlaceholder[] diff --git a/src/frontend/src/features/pip/components/layout/PipScreenShareLayout.tsx b/src/frontend/src/features/pip/components/layout/PipScreenShareLayout.tsx index b78dbcc0..035f8d44 100644 --- a/src/frontend/src/features/pip/components/layout/PipScreenShareLayout.tsx +++ b/src/frontend/src/features/pip/components/layout/PipScreenShareLayout.tsx @@ -2,7 +2,7 @@ import { memo } from 'react' import type { TrackReferenceOrPlaceholder } from '@livekit/components-core' import { styled } from '@/styled-system/jsx' import { ParticipantTile } from '@/features/rooms/livekit/components/ParticipantTile' -import { getTrackKey } from '../../utils/pipTrackSelection' +import { getTrackKey } from '@/features/layout/utils/trackSelection' type PipScreenShareLayoutProps = { screenShareTrack: TrackReferenceOrPlaceholder