mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-03 06:48:21 +00:00
Merge pull request #5 from i701/feat/admin-devices-table
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 6m41s
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 6m41s
refactor: remove unused import and improve conditional rendering in b…
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { Suspense } from "react";
|
||||
import { authOptions } from "@/app/auth";
|
||||
|
@ -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 (
|
||||
<div>
|
||||
{device.blocked ? (
|
||||
{device.blocked && !admin ? (
|
||||
<Button
|
||||
onClick={() => {
|
||||
setDisabled(true);
|
||||
|
Reference in New Issue
Block a user