import type { PreAuthKey } from '~/types' import { toast } from '~/components/Toaster' import Code from '~/components/Code' import Button from '~/components/Button' import Attribute from '~/components/Attribute' import ExpireKey from './dialogs/expire' interface Props { authKey: PreAuthKey server: string } export default function AuthKeyRow({ authKey, server }: Props) { const createdAt = new Date(authKey.createdAt).toLocaleString() const expiration = new Date(authKey.expiration).toLocaleString() return (

To use this key, run the following command on your device:

tailscale up --login-server {server} --authkey {authKey.key}
{authKey.used || new Date(authKey.expiration) < new Date() ? undefined : ( )}
) }