File tree 3 files changed +8
-6
lines changed
site/src/pages/UserSettingsPage/TokensPage
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 4
4
" agentsdk" ,
5
5
" apps" ,
6
6
" ASKPASS" ,
7
+ " authcheck" ,
7
8
" autostop" ,
8
9
" awsidentity" ,
9
10
" bodyclose" ,
Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ import makeStyles from "@material-ui/core/styles/makeStyles"
5
5
import { useTranslation , Trans } from "react-i18next"
6
6
import { useTokensData , useCheckTokenPermissions } from "./hooks"
7
7
import { TokensSwitch , ConfirmDeleteDialog } from "./components"
8
+ import { APIKey } from "api/typesGenerated"
9
+
10
+ export interface ConvertedAPIKey extends APIKey {
11
+ username : string
12
+ }
8
13
9
14
export const TokensPage : FC < PropsWithChildren < unknown > > = ( ) => {
10
15
const styles = useStyles ( )
@@ -48,7 +53,7 @@ export const TokensPage: FC<PropsWithChildren<unknown>> = () => {
48
53
setViewAllTokens = { setViewAllTokens }
49
54
/>
50
55
< TokensPageView
51
- tokens = { tokens }
56
+ tokens = { tokens as ConvertedAPIKey [ ] }
52
57
viewAllTokens = { viewAllTokens }
53
58
isLoading = { isFetching }
54
59
hasLoaded = { isFetched }
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import TableCell from "@material-ui/core/TableCell"
5
5
import TableContainer from "@material-ui/core/TableContainer"
6
6
import TableHead from "@material-ui/core/TableHead"
7
7
import TableRow from "@material-ui/core/TableRow"
8
- import { APIKey } from "api/typesGenerated"
9
8
import { ChooseOne , Cond } from "components/Conditionals/ChooseOne"
10
9
import { Stack } from "components/Stack/Stack"
11
10
import { TableEmpty } from "components/TableEmpty/TableEmpty"
@@ -16,17 +15,14 @@ import { FC } from "react"
16
15
import { AlertBanner } from "components/AlertBanner/AlertBanner"
17
16
import IconButton from "@material-ui/core/IconButton/IconButton"
18
17
import { useTranslation } from "react-i18next"
18
+ import { ConvertedAPIKey } from "./TokensPage"
19
19
20
20
const lastUsedOrNever = ( lastUsed : string ) => {
21
21
const t = dayjs ( lastUsed )
22
22
const now = dayjs ( )
23
23
return now . isBefore ( t . add ( 100 , "year" ) ) ? t . fromNow ( ) : "Never"
24
24
}
25
25
26
- interface ConvertedAPIKey extends APIKey {
27
- username : string
28
- }
29
-
30
26
export interface TokensPageViewProps {
31
27
tokens ?: ConvertedAPIKey [ ]
32
28
viewAllTokens : boolean
You can’t perform that action at this time.
0 commit comments