Fix admin regressions from Biome refactor: theme init, mobile nav, i18n.
Local Build and Deploy / deploy (push) Successful in 54s

Restore valid browser JS in theme-init, close mobile sidebar on navigation, and split autoDjForm title/trackTitle across locales.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-15 20:02:25 +02:00
1 parent 59b63d6e70
commit bae543baf6
23 files changed
+87 -44

No files matched your search

+21 -1
View File
@@ -1,7 +1,23 @@
"use client";
import { Menu, X } from "lucide-react";
import { type ReactNode, useEffect, useState } from "react";
import {
createContext,
type ReactNode,
useCallback,
useContext,
useEffect,
useMemo,
useState,
} from "react";
const AdminMobileContext = createContext<{ close: () => void }>({
close: () => {},
});
export function useAdminMobile() {
return useContext(AdminMobileContext);
}
export function AdminMobileWrapper({
sidebar,
@@ -11,6 +27,8 @@ export function AdminMobileWrapper({
children: ReactNode;
}) {
const [open, setOpen] = useState(false);
const close = useCallback(() => setOpen(false), []);
const mobile = useMemo(() => ({ close }), [close]);
useEffect(() => {
if (!open) return;
@@ -22,6 +40,7 @@ export function AdminMobileWrapper({
}, [open]);
return (
<AdminMobileContext.Provider value={mobile}>
<div className="min-h-screen bg-[var(--admin-canvas)] flex flex-col lg:flex-row">
{/* Mobile header */}
<div
@@ -72,5 +91,6 @@ export function AdminMobileWrapper({
{/* Content */}
<div className="flex flex-col flex-1 min-w-0">{children}</div>
</div>
</AdminMobileContext.Provider>
);
}