add admin checks for admin pages and run biome formating 🔨
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s

This commit is contained in:
2025-07-25 13:31:12 +05:00
parent aedf7cdf7d
commit 9b2f2c1528
127 changed files with 6577 additions and 6334 deletions

View File

@ -12,7 +12,11 @@ import { Badge } from "./ui/badge";
export default function DeviceCard({
device,
parentalControl,
}: { device: Device; parentalControl?: boolean, isAdmin?: boolean }) {
}: {
device: Device;
parentalControl?: boolean;
isAdmin?: boolean;
}) {
const [devices, setDeviceCart] = useAtom(deviceCartAtom);
const isChecked = devices.some((d) => d.id === device.id);
@ -20,7 +24,7 @@ export default function DeviceCard({
return (
// biome-ignore lint/a11y/noStaticElementInteractions: <dw about it>
<div
onKeyUp={() => { }}
onKeyUp={() => {}}
onClick={() => {
if (device.blocked) return;
if (device.is_active === true) return;
@ -46,7 +50,10 @@ export default function DeviceCard({
<div className="">
<div className="font-semibold flex flex-col items-start gap-2 mb-2">
<Link
className={cn("font-medium hover:underline ml-0.5", device.is_active ? "text-green-600" : "")}
className={cn(
"font-medium hover:underline ml-0.5",
device.is_active ? "text-green-600" : "",
)}
href={`/devices/${device.id}`}
>
{device.name}
@ -59,7 +66,6 @@ export default function DeviceCard({
</Badge>
</div>
{device.is_active ? (
<div className="text-muted-foreground ml-0.5">
Active until{" "}