Update apps/web/ee/components/apiKeys/ApiKeyListItem.tsx
Co-authored-by: Alex van Andel <me@alexvanandel.com>pull/2277/head
parent
9312662e14
commit
1ea1cff04a
|
@ -22,7 +22,7 @@ export type TApiKeys = inferQueryOutput<"viewer.apiKeys.list">[number];
|
||||||
export default function ApiKeyListItem(props: { apiKey: TApiKeys; onEditApiKey: () => void }) {
|
export default function ApiKeyListItem(props: { apiKey: TApiKeys; onEditApiKey: () => void }) {
|
||||||
const { t } = useLocale();
|
const { t } = useLocale();
|
||||||
const utils = trpc.useContext();
|
const utils = trpc.useContext();
|
||||||
const isExpired = props?.apiKey?.expiresAt ? props?.apiKey?.expiresAt < new Date() : null;
|
const isExpired = props?.apiKey?.expiresAt ? props.apiKey.expiresAt < new Date() : null;
|
||||||
const neverExpires = props?.apiKey?.expiresAt === null;
|
const neverExpires = props?.apiKey?.expiresAt === null;
|
||||||
const deleteApiKey = trpc.useMutation("viewer.apiKeys.delete", {
|
const deleteApiKey = trpc.useMutation("viewer.apiKeys.delete", {
|
||||||
async onSuccess() {
|
async onSuccess() {
|
||||||
|
|
Loading…
Reference in New Issue