import { useIsEdgeAdmin } from '@/react/hooks/useUser';
import { TooltipWithChildren } from '@@/Tip/TooltipWithChildren';
import { EditButton } from './EditButton';
interface Props {
stackId: number | undefined;
}
export function EdgeEditButton({ stackId }: Props) {
const edgeAdminQuery = useIsEdgeAdmin();
const isDisabled =
edgeAdminQuery.isLoading || !edgeAdminQuery.isAdmin || !stackId;
const button = (
Manage edge stack
);
if (edgeAdminQuery.isLoading || edgeAdminQuery.isAdmin || !stackId) {
return button;
}
return (
{button}
);
}