From 8051b00dcf0e4166a47fdb9d58abefb161f41c0d Mon Sep 17 00:00:00 2001 From: i701 Date: Tue, 1 Jul 2025 06:59:38 +0500 Subject: [PATCH] =?UTF-8?q?refactor:=20remove=20unused=20import=20and=20im?= =?UTF-8?q?prove=20conditional=20rendering=20in=20block=20device=20dialog?= =?UTF-8?q?=20=F0=9F=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(dashboard)/devices/page.tsx | 1 - components/block-device-dialog.tsx | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/(dashboard)/devices/page.tsx b/app/(dashboard)/devices/page.tsx index cf5d016..5edb765 100644 --- a/app/(dashboard)/devices/page.tsx +++ b/app/(dashboard)/devices/page.tsx @@ -1,4 +1,3 @@ -import { redirect } from "next/navigation"; import { getServerSession } from "next-auth"; import { Suspense } from "react"; import { authOptions } from "@/app/auth"; diff --git a/components/block-device-dialog.tsx b/components/block-device-dialog.tsx index 209db18..365e692 100644 --- a/components/block-device-dialog.tsx +++ b/components/block-device-dialog.tsx @@ -7,7 +7,6 @@ import { useState } from "react"; import { type SubmitHandler, useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; -import { blockDevice as BlockDeviceFromOmada } from "@/actions/omada-actions"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -70,7 +69,7 @@ export default function BlockDeviceDialog({ return (
- {device.blocked ? ( + {device.blocked && !admin ? (