From ff1fbccfdc3cd58c59c05612d306d4cf1861ec66 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 4 Mar 2021 13:41:29 +0100 Subject: [PATCH] fixed types --- package.json | 2 +- src/clients/initial-access/CreateInitialAccessToken.tsx | 4 ++-- src/clients/initial-access/InitialAccessTokenList.tsx | 4 ++-- yarn.lock | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 961243784d..8a97229823 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@patternfly/react-table": "4.23.0", "file-saver": "^2.0.2", "i18next": "^19.6.2", - "keycloak-admin": "1.14.8", + "keycloak-admin": "1.14.9", "lodash": "^4.17.20", "moment": "^2.29.1", "react": "^16.8.5", diff --git a/src/clients/initial-access/CreateInitialAccessToken.tsx b/src/clients/initial-access/CreateInitialAccessToken.tsx index 47eb10a613..005764849a 100644 --- a/src/clients/initial-access/CreateInitialAccessToken.tsx +++ b/src/clients/initial-access/CreateInitialAccessToken.tsx @@ -1,4 +1,4 @@ -import React, { FormEvent, useState } from "react"; +import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import { Controller, useForm } from "react-hook-form"; import { @@ -38,7 +38,7 @@ export const CreateInitialAccessToken = () => { { realm }, clientToken ); - setToken(access.token); + setToken(access.token!); } catch (error) { addAlert(t("tokenSaveError", { error }), AlertVariant.danger); } diff --git a/src/clients/initial-access/InitialAccessTokenList.tsx b/src/clients/initial-access/InitialAccessTokenList.tsx index 5663aa15cd..9e850304a3 100644 --- a/src/clients/initial-access/InitialAccessTokenList.tsx +++ b/src/clients/initial-access/InitialAccessTokenList.tsx @@ -40,13 +40,13 @@ export const InitialAccessTokenList = () => { { name: "timestamp", displayKey: "clients:timestamp", - cellRenderer: (row) => moment(row.timestamp * 1000).format("LLL"), + cellRenderer: (row) => moment(row.timestamp! * 1000).format("LLL"), }, { name: "expiration", displayKey: "clients:expires", cellRenderer: (row) => - moment(row.timestamp * 1000 + row.expiration * 1000).fromNow(), + moment(row.timestamp! * 1000 + row.expiration! * 1000).fromNow(), }, { name: "count", diff --git a/yarn.lock b/yarn.lock index db22e76e4e..1ca1a2d3c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13477,10 +13477,10 @@ junk@^3.1.0: resolved "https://registry.yarnpkg.com/junk/-/junk-3.1.0.tgz#31499098d902b7e98c5d9b9c80f43457a88abfa1" integrity sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ== -keycloak-admin@1.14.8: - version "1.14.8" - resolved "https://registry.yarnpkg.com/keycloak-admin/-/keycloak-admin-1.14.8.tgz#c6935146eab94ba125761888b04442c51ec1d5e5" - integrity sha512-1eX7HTL/C1M51QGWg47TiYNZrIhmv6ximyscghCZxd1waKC7jjo1vqHOZkBUBQDSFYDEq61b7hH64gbw2XOgYw== +keycloak-admin@1.14.9: + version "1.14.9" + resolved "https://registry.yarnpkg.com/keycloak-admin/-/keycloak-admin-1.14.9.tgz#f068e8580714c3b92987901cfe6c83bfba669a2a" + integrity sha512-VaS6unTYLWuEkqb+FAY+c0Oo+ta505OxhOntCHLcgysMwRmL5pz6taVK8lUZ1ir/6QVto62adVQjmN5fMkpSWg== dependencies: axios "^0.21.0" camelize "^1.0.0"