fix(web): remove unused var in AppSidebar and drop ambient declaration for DetailLine (TS error)
This commit is contained in:
parent
e3d6fea412
commit
a4b31b0cb3
2 changed files with 3 additions and 4 deletions
|
|
@ -42,9 +42,8 @@ type MachineSoftware = {
|
||||||
source?: string
|
source?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forward declaration to ensure props are known before JSX usage
|
// Props type for DetailLine (used below)
|
||||||
type DetailLineProps = { label: string; value?: string | number | null; classNameValue?: string }
|
type DetailLineProps = { label: string; value?: string | number | null; classNameValue?: string }
|
||||||
declare function DetailLine(props: DetailLineProps): JSX.Element
|
|
||||||
|
|
||||||
type LinuxExtended = {
|
type LinuxExtended = {
|
||||||
lsblk?: unknown
|
lsblk?: unknown
|
||||||
|
|
@ -1340,7 +1339,7 @@ function MachineCard({ machine }: { machine: MachinesQueryItem }) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function DetailLine({ label, value, classNameValue }: { label: string; value?: string | number | null; classNameValue?: string }) {
|
function DetailLine({ label, value, classNameValue }: DetailLineProps) {
|
||||||
if (value === null || value === undefined) return null
|
if (value === null || value === undefined) return null
|
||||||
if (typeof value === "string" && (value.trim() === "" || value === "undefined" || value === "null")) {
|
if (typeof value === "string" && (value.trim() === "" || value === "undefined" || value === "null")) {
|
||||||
return null
|
return null
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ const navigation: { versions: string[]; navMain: NavigationGroup[] } = {
|
||||||
|
|
||||||
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
||||||
const pathname = usePathname()
|
const pathname = usePathname()
|
||||||
const { session, isLoading, isAdmin, isStaff, convexUserId } = useAuth()
|
const { session, isLoading, isAdmin, isStaff } = useAuth()
|
||||||
const [isHydrated, setIsHydrated] = React.useState(false)
|
const [isHydrated, setIsHydrated] = React.useState(false)
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue