e6d8ffb202
* initial version of the scopes screen * added scopes edit details * Update src/clients/authorization/MoreLabel.tsx Co-authored-by: Jon Koops <jonkoops@gmail.com> * pr review * Update src/clients/routes/NewScope.ts Co-authored-by: Jon Koops <jonkoops@gmail.com> * Update src/clients/authorization/Scopes.tsx Co-authored-by: Jon Koops <jonkoops@gmail.com> * Update src/clients/authorization/Scopes.tsx Co-authored-by: Jon Koops <jonkoops@gmail.com> * merge fix Co-authored-by: Jon Koops <jonkoops@gmail.com>
18 lines
443 B
TypeScript
18 lines
443 B
TypeScript
import React from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import { Label } from "@patternfly/react-core";
|
|
|
|
type MoreLabelProps = {
|
|
array: unknown[] | undefined;
|
|
};
|
|
|
|
export const MoreLabel = ({ array }: MoreLabelProps) => {
|
|
const { t } = useTranslation("clients");
|
|
|
|
if (!array || array.length <= 1) {
|
|
return null;
|
|
}
|
|
return (
|
|
<Label color="blue">{t("common:more", { count: array.length - 1 })}</Label>
|
|
);
|
|
};
|