Skip to content

Commit 52a16ea

Browse files
committed
fix api key expire bug
- this was subtle fallout from upgrade react and/or next recently
1 parent 42edb28 commit 52a16ea

File tree

2 files changed

+115
-87
lines changed

2 files changed

+115
-87
lines changed

src/packages/frontend/components/api-keys.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import dayjs from "dayjs";
2424
import { useEffect, useState } from "react";
2525
import TimeAgo from "react-timeago"; // so can use from nextjs
2626
const { Text, Paragraph } = Typography; // so can use from nextjs
27-
2827
import { CancelText } from "@cocalc/frontend/i18n/components";
2928
import type { ApiKey } from "@cocalc/util/db-schema/api-keys";
3029
import { A } from "./A";
@@ -205,7 +204,7 @@ export default function ApiKeys({ manage, mode = "project" }: Props) {
205204

206205
const handleModalOK = () => {
207206
const name = form.getFieldValue("name");
208-
const expire = form.getFieldValue("expire");
207+
const expire = form.getFieldValue("expire")?.toDate();
209208
if (editingKey != null) {
210209
editApiKey(editingKey, name, expire);
211210
setEditModalVisible(false);

0 commit comments

Comments
 (0)