GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: render SortableProjectItem as <li> to produce valid HTML inside … · pingdotgg/t3code@410550e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/web/src/components
    • Sidebar.tsx
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/web/src/components/Sidebar.tsx‎

Copy file name to clipboardExpand all lines: apps/web/src/components/Sidebar.tsx
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,26 +273,28 @@ type SortableProjectHandleProps = Pick<ReturnType<typeof useSortable>, "attribut
273273

274274
function SortableProjectItem({
275275
projectId,
276+
className,
276277
children,
277278
}: {
278279
projectId: ProjectId;
280+
className?: string;
279281
children: (handleProps: SortableProjectHandleProps) => React.ReactNode;
280282
}) {
281283
const { attributes, listeners, setNodeRef, transform, transition, isDragging, isOver } =
282284
useSortable({ id: projectId });
283285
return (
284-
<div
286+
<SidebarMenuItem
285287
ref={setNodeRef}
286288
style={{
287289
transform: CSS.Translate.toString(transform),
288290
transition,
289291
}}
290292
className={`rounded-md ${
291293
isDragging ? "z-20 opacity-80" : ""
292-
} ${isOver && !isDragging ? "ring-1 ring-primary/40" : ""}`}
294+
} ${isOver && !isDragging ? "ring-1 ring-primary/40" : ""} ${className ?? ""}`}
293295
>
294296
{children({ attributes, listeners })}
295-
</div>
297+
</SidebarMenuItem>
296298
);
297299
}
298300

@@ -1205,9 +1207,9 @@ export default function Sidebar() {
12051207
: projectThreads;
12061208

12071209
return (
1208-
<SortableProjectItem key={project.id} projectId={project.id}>
1210+
<SortableProjectItem key={project.id} projectId={project.id} className="group/collapsible">
12091211
{(dragHandleProps) => (
1210-
<SidebarMenuItem className="group/collapsible">
1212+
<>
12111213
<div className="group/project-header relative">
12121214
<SidebarMenuButton
12131215
size="sm"
@@ -1448,7 +1450,7 @@ export default function Sidebar() {
14481450
</SidebarMenuSub>
14491451
</div>
14501452
</div>
1451-
</SidebarMenuItem>
1453+
</>
14521454
)}
14531455
</SortableProjectItem>
14541456
);

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.