1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-13 11:17:26 +02:00

fix token type description (#3158)

This commit is contained in:
andreas-unleash 2023-02-20 13:35:34 +02:00 committed by GitHub
parent 7996f12974
commit 249856e3a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View File

@ -67,7 +67,7 @@ export const ApiTokenTable = ({
Cell: ({ Cell: ({
value, value,
}: { }: {
value: 'admin' | 'client' | 'frontend'; value: keyof typeof tokenDescriptions;
}) => ( }) => (
<HighlightCell <HighlightCell
value={tokenDescriptions[value].label} value={tokenDescriptions[value].label}
@ -260,7 +260,7 @@ export const ApiTokenTable = ({
</PageContent> </PageContent>
); );
}; };
//TODO fix me - remove duplicate keys
const tokenDescriptions = { const tokenDescriptions = {
client: { client: {
label: 'CLIENT', label: 'CLIENT',
@ -274,4 +274,16 @@ const tokenDescriptions = {
label: 'ADMIN', label: 'ADMIN',
title: 'Full access for managing Unleash', title: 'Full access for managing Unleash',
}, },
CLiENT: {
label: 'CLIENT',
title: 'Connect server-side SDK or Unleash Proxy',
},
FRONTEND: {
label: 'FRONTEND',
title: 'Connect web and mobile SDK',
},
ADMIN: {
label: 'ADMIN',
title: 'Full access for managing Unleash',
},
}; };

View File

@ -22,7 +22,6 @@ export const ProjectsList: VFC<IProjectsListProps> = ({
project, project,
}) => { }) => {
const { searchQuery } = useSearchHighlightContext(); const { searchQuery } = useSearchHighlightContext();
let fields: string[] = let fields: string[] =
projects && Array.isArray(projects) projects && Array.isArray(projects)
? projects ? projects