mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 23:45:44 +01:00
fix imports
This commit is contained in:
@@ -22,25 +22,24 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { FC } from "react";
|
import React, {FC} from "react";
|
||||||
import {DateFromNow, DeleteButton, DownloadButton} from "@scm-manager/ui-components/src";
|
import {DateFromNow, DeleteButton} from "@scm-manager/ui-components";
|
||||||
import { PublicKey } from "./SetPublicKeys";
|
import {PublicKey} from "./SetPublicKeys";
|
||||||
import { useTranslation } from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import { Link } from "@scm-manager/ui-types";
|
import {Link} from "@scm-manager/ui-types";
|
||||||
import styled from "styled-components";
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
publicKey: PublicKey;
|
publicKey: PublicKey;
|
||||||
onDelete: (link: string) => void;
|
onDelete: (link: string) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const PublicKeyEntry: FC<Props> = ({ publicKey, onDelete }) => {
|
export const PublicKeyEntry: FC<Props> = ({publicKey, onDelete}) => {
|
||||||
const [t] = useTranslation("users");
|
const [t] = useTranslation("users");
|
||||||
|
|
||||||
let deleteButton;
|
let deleteButton;
|
||||||
if (publicKey?._links?.delete) {
|
if (publicKey?._links?.delete) {
|
||||||
deleteButton = (
|
deleteButton = (
|
||||||
<DeleteButton label={t("publicKey.delete")} action={() => onDelete((publicKey._links.delete as Link).href)} />
|
<DeleteButton label={t("publicKey.delete")} action={() => onDelete((publicKey._links.delete as Link).href)}/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,9 +48,10 @@ export const PublicKeyEntry: FC<Props> = ({ publicKey, onDelete }) => {
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{publicKey.displayName}</td>
|
<td>{publicKey.displayName}</td>
|
||||||
<td className="is-hidden-mobile">
|
<td className="is-hidden-mobile">
|
||||||
<DateFromNow date={publicKey.created} />
|
<DateFromNow date={publicKey.created}/>
|
||||||
</td>
|
</td>
|
||||||
<td className="is-hidden-mobile">{publicKey._links?.raw ? <a href={(publicKey._links.raw as Link).href}>{publicKey.id}</a> : publicKey.id}</td>
|
<td className="is-hidden-mobile">{publicKey._links?.raw ?
|
||||||
|
<a href={(publicKey._links.raw as Link).href}>{publicKey.id}</a> : publicKey.id}</td>
|
||||||
<td>{deleteButton}</td>
|
<td>{deleteButton}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user