client/web: fix key expiry text when expiry disabled

Displays "No expiry" when disabled.

Updates #10261

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
Sonia Appasamy 2023-12-12 17:16:46 -05:00 committed by Sonia Appasamy
parent 06af3e3014
commit 77f5d669fa
1 changed files with 3 additions and 1 deletions

View File

@ -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>