client/web: fix key expiry text when expiry disabled

Displays "No expiry" when disabled.

Updates #10261

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
pull/10577/head
Sonia Appasamy 12 months ago committed by Sonia Appasamy
parent 06af3e3014
commit 77f5d669fa

@ -94,7 +94,9 @@ export default function DeviceDetailsView({
{node.KeyExpired
? "Expired"
: // TODO: present as relative expiry (e.g. "5 months from now")
new Date(node.KeyExpiry).toLocaleString()}
node.KeyExpiry
? new Date(node.KeyExpiry).toLocaleString()
: "No expiry"}
</td>
</tr>
</tbody>

Loading…
Cancel
Save