Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions torchci/components/layout/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, { useState } from "react";
import { AiFillGithub } from "react-icons/ai";
import ThemeModePicker from "../common/ThemeModePicker";
import LoginSection from "./LoginSection";
import { NavBarGroupDropdown } from "./NavBarGroupDropdown";
import { NavBarGroupDropdown, NavItem } from "./NavBarGroupDropdown";

const NavBarDropdown = ({
title,
Expand Down Expand Up @@ -89,7 +89,7 @@ const NavBarDropdown = ({
function NavBar() {
const benchmarkDropdown = benchmarkNavGroup;

const devInfraDropdown = [
const devInfraDropdown: NavItem[] = [
{
name: "TTS",
href: "/tts",
Expand Down Expand Up @@ -147,7 +147,11 @@ function NavBar() {
name: "Test File Reports",
href: "/tests/fileReport",
},
];
].map((item) => ({
label: item.name,
route: item.href,
type: "item",
}));
Copy link
Contributor Author

@clee2000 clee2000 Nov 19, 2025

Choose a reason for hiding this comment

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

Not really sure this is the best idea. The label/route is a simple rename and I can do that above (but it makes the git blame less clear), but each one needs a "type": "item" and putting that in each entry seems a bit too much


const metricsDropdown = [
{
Expand Down Expand Up @@ -245,7 +249,7 @@ function NavBar() {
</li>
<NavBarGroupDropdown title="Benchmarks" items={benchmarkDropdown} />{" "}
<NavBarDropdown title="Metrics" items={metricsDropdown} />
<NavBarDropdown title="Dev Infra" items={devInfraDropdown} />
<NavBarGroupDropdown title="Dev Infra" items={devInfraDropdown} />
<li
style={{ cursor: "pointer", display: "flex", alignItems: "center" }}
>
Expand Down