From fe7f59eb10af9f419d83d3768d8367649ce98e56 Mon Sep 17 00:00:00 2001 From: calvin Date: Tue, 30 May 2023 13:19:14 -0600 Subject: [PATCH] feat: [code-286]: fix tag comments --- .../components/CreateTagModal/CreateTagModal.tsx | 1 - .../RepositoryTagsContentHeader.tsx | 2 +- .../RepositoryTags/TagsContent/TagsContent.tsx | 15 ++++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/src/components/CreateTagModal/CreateTagModal.tsx b/web/src/components/CreateTagModal/CreateTagModal.tsx index 132d138cf..a37c8a39c 100644 --- a/web/src/components/CreateTagModal/CreateTagModal.tsx +++ b/web/src/components/CreateTagModal/CreateTagModal.tsx @@ -147,7 +147,6 @@ export function useCreateTagModal({ repoMetadata={repoMetadata} disableBranchCreation disableViewAllBranches - forBranchesOnly gitRef={sourceBranch} onSelect={setSourceBranch} /> diff --git a/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.tsx b/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.tsx index a54de806f..042097b29 100644 --- a/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.tsx +++ b/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.tsx @@ -22,12 +22,12 @@ export function RepositoryTagsContentHeader({ }: RepositoryTagsContentHeaderProps) { const { getString } = useStrings() const [searchTerm, setSearchTerm] = useState('') - return ( { diff --git a/web/src/pages/RepositoryTags/TagsContent/TagsContent.tsx b/web/src/pages/RepositoryTags/TagsContent/TagsContent.tsx index df6f842bd..d28cabaea 100644 --- a/web/src/pages/RepositoryTags/TagsContent/TagsContent.tsx +++ b/web/src/pages/RepositoryTags/TagsContent/TagsContent.tsx @@ -21,6 +21,7 @@ import type { OpenapiCalculateCommitDivergenceRequest, RepoBranch, RepoCommitDivergence, + RepoCommitTag, TypesRepository } from 'services/code' import { formatDate, getErrorMessage, voidFn } from 'utils/Utils' @@ -28,7 +29,7 @@ import { useConfirmAction } from 'hooks/useConfirmAction' import { OptionsMenuButton } from 'components/OptionsMenuButton/OptionsMenuButton' import { useCreateBranchModal } from 'components/CreateBranchModal/CreateBranchModal' import { CommitActions } from 'components/CommitActions/CommitActions' -import { CodeIcon } from 'utils/GitUtils' +import { CodeIcon, REFS_TAGS_PREFIX } from 'utils/GitUtils' import css from './TagsContent.module.scss' interface TagsContentProps { @@ -63,7 +64,7 @@ export function TagsContent({ repoMetadata, searchTerm = '', branches, onDeleteS } }, [getBranchDivergence, branchDivergenceRequestBody]) const onSuccess = voidFn(noop) - const openModal = useCreateBranchModal({ repoMetadata, onSuccess }) + const openModal = useCreateBranchModal({ repoMetadata, onSuccess,showSuccessMessage: true }) const columns: Column[] = useMemo( () => [ @@ -110,12 +111,12 @@ export function TagsContent({ repoMetadata, searchTerm = '', branches, onDeleteS { Header: getString('tagger'), width: '20%', - Cell: ({ row }: CellProps) => { + Cell: ({ row }: CellProps) => { return ( - {row.original.commit?.author?.identity?.name || ''} + {row.original.tagger?.identity?.name || ''} ) } @@ -123,11 +124,11 @@ export function TagsContent({ repoMetadata, searchTerm = '', branches, onDeleteS { Header: getString('creationDate'), width: '200px', - Cell: ({ row }: CellProps) => { + Cell: ({ row }: CellProps) => { return ( - {formatDate(row.original.commit?.author?.when as string)} + {formatDate(row.original.tagger?.when as string)} ) } @@ -179,7 +180,7 @@ export function TagsContent({ repoMetadata, searchTerm = '', branches, onDeleteS history.push( routes.toCODERepository({ repoPath: repoMetadata.path as string, - gitRef: row.original?.name + gitRef: `${REFS_TAGS_PREFIX}${row.original?.name}` }) ) }