fix(profiles): enable drag-and-drop reordering for built-in profiles

Wrap built-in profiles section with DndContext and SortableContext
to allow reordering of pre-configured profiles, matching the behavior
available for custom profiles.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
This commit is contained in:
Kacper
2025-12-10 14:44:39 +01:00
parent fff8a6398f
commit e210d676c1
2 changed files with 40 additions and 10 deletions

View File

@@ -598,16 +598,27 @@ export function ProfilesView() {
Pre-configured profiles for common use cases. These cannot be
edited or deleted.
</p>
<div className="space-y-3">
{builtInProfiles.map((profile) => (
<SortableProfileCard
key={profile.id}
profile={profile}
onEdit={() => {}}
onDelete={() => {}}
/>
))}
</div>
<DndContext
sensors={sensors}
collisionDetection={closestCenter}
onDragEnd={handleDragEnd}
>
<SortableContext
items={builtInProfiles.map((p) => p.id)}
strategy={verticalListSortingStrategy}
>
<div className="space-y-3">
{builtInProfiles.map((profile) => (
<SortableProfileCard
key={profile.id}
profile={profile}
onEdit={() => {}}
onDelete={() => {}}
/>
))}
</div>
</SortableContext>
</DndContext>
</div>
</div>
</div>