Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 30x 30x | import { Link } from "react-router-dom";
import { Tooltip } from "@canonical/react-components";
import type { ISnap } from "../../types";
function SnapNameEntry({ snap }: { snap: ISnap }): React.JSX.Element {
const { snapName, status, icon_url } = snap;
return (
<Link to={`/${snapName}/listing`} className="p-heading-icon--small">
<span className="p-heading-icon__header">
<img
src={
icon_url
? icon_url
: "https://assets.ubuntu.com/v1/be6eb412-snapcraft-missing-icon.svg"
}
width="32"
height="32"
className="p-heading-icon__img"
alt="snap icon"
/>
<p className="u-no-margin--bottom">
{snapName}
{status === "DisputePending" && (
<>
<Tooltip message="Name dispute in progress">
<i className="p-icon--warning"></i>
</Tooltip>
</>
)}
</p>
</span>
</Link>
);
}
export default SnapNameEntry;
|