// Copyright (c) Tailscale Inc & AUTHORS // SPDX-License-Identifier: BSD-3-Clause import React from "react" import { NodeData } from "src/types" /** * AdminContainer renders its contents only if the node's control * server has an admin panel. * * TODO(sonia,will): Similarly, this could also hide the contents * if the viewing user is a non-admin. */ export function AdminContainer({ node, children, className, }: { node: NodeData children: React.ReactNode className?: string }) { if (!node.ControlAdminURL.includes("tailscale.com")) { // Admin panel only exists on Tailscale control servers. return null } return