mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
fix review findings
This commit is contained in:
@@ -26,7 +26,7 @@ import { Trans, useTranslation, WithTranslation, withTranslation } from "react-i
|
||||
import classNames from "classnames";
|
||||
import styled from "styled-components";
|
||||
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||
import {Changeset, Link, ParentChangeset, Repository, Tag} from "@scm-manager/ui-types";
|
||||
import { Changeset, Link, ParentChangeset, Repository, Tag } from "@scm-manager/ui-types";
|
||||
import {
|
||||
AvatarImage,
|
||||
AvatarWrapper,
|
||||
|
||||
@@ -33,6 +33,7 @@ type Props = {
|
||||
tag: Tag;
|
||||
baseUrl: string;
|
||||
onDelete: (tag: Tag) => void;
|
||||
// deleting: boolean;
|
||||
};
|
||||
|
||||
const Created = styled.span`
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
import React, {FC, useState} from "react";
|
||||
import {Link, Tag} from "@scm-manager/ui-types";
|
||||
import React, { FC, useState } from "react";
|
||||
import { Link, Tag } from "@scm-manager/ui-types";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import TagRow from "./TagRow";
|
||||
import {apiClient, ConfirmAlert, ErrorNotification} from "@scm-manager/ui-components";
|
||||
import { apiClient, ConfirmAlert, ErrorNotification } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = {
|
||||
baseUrl: string;
|
||||
@@ -88,17 +88,18 @@ const TagTable: FC<Props> = ({ baseUrl, tags, fetchTags }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
{showConfirmAlert && confirmAlert}
|
||||
{error && <ErrorNotification error={error} />}
|
||||
<table className="card-table table is-hoverable is-fullwidth is-word-break">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{t("tags.table.tags")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>{renderRow()}</tbody>
|
||||
</table>
|
||||
</>);
|
||||
{showConfirmAlert && confirmAlert}
|
||||
{error && <ErrorNotification error={error} />}
|
||||
<table className="card-table table is-hoverable is-fullwidth is-word-break">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{t("tags.table.tags")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>{renderRow()}</tbody>
|
||||
</table>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default TagTable;
|
||||
|
||||
@@ -60,7 +60,7 @@ const TagsOverview: FC<Props> = ({ repository, baseUrl }) => {
|
||||
const renderTagsTable = () => {
|
||||
if (!loading && tags?.length > 0) {
|
||||
orderTags(tags);
|
||||
return <TagTable baseUrl={baseUrl} tags={tags} fetchTags={() => fetchTags()} />;
|
||||
return <TagTable baseUrl={baseUrl} tags={tags} fetchTags={fetchTags} />;
|
||||
}
|
||||
return <Notification type="info">{t("tags.overview.noTags")}</Notification>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user