From 6295ca4ef75b691f411bfcc88c3de90ba121d985 Mon Sep 17 00:00:00 2001 From: Allen Zhang <37892968+zhangtao25@users.noreply.github.com> Date: Tue, 20 Feb 2024 22:08:07 +0800 Subject: [PATCH] feat: add icon --- packages/canyon-backend/src/adapter/gitlab.adapter.ts | 1 - packages/canyon-platform/src/components/sha.tsx | 6 ++++++ .../src/pages/index/projects/[id]/index.tsx | 10 ++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 packages/canyon-platform/src/components/sha.tsx diff --git a/packages/canyon-backend/src/adapter/gitlab.adapter.ts b/packages/canyon-backend/src/adapter/gitlab.adapter.ts index 2b1d9eff..ee9f9607 100755 --- a/packages/canyon-backend/src/adapter/gitlab.adapter.ts +++ b/packages/canyon-backend/src/adapter/gitlab.adapter.ts @@ -153,7 +153,6 @@ export const getCommits = async ( { projectID, commitShas }: { projectID: string; commitShas: string[] }, token: string, ) => { - console.log('getCommits', commitShas); return await Promise.all( commitShas.map((commitSha) => { return axios diff --git a/packages/canyon-platform/src/components/sha.tsx b/packages/canyon-platform/src/components/sha.tsx new file mode 100644 index 00000000..1e6ff4a3 --- /dev/null +++ b/packages/canyon-platform/src/components/sha.tsx @@ -0,0 +1,6 @@ +// import React from 'react'; +import type { SVGProps } from 'react'; + +export default function MaterialSymbolsCommitSharp(props: SVGProps) { + return (); +} diff --git a/packages/canyon-platform/src/pages/index/projects/[id]/index.tsx b/packages/canyon-platform/src/pages/index/projects/[id]/index.tsx index 3f575ea9..7fa3a03e 100755 --- a/packages/canyon-platform/src/pages/index/projects/[id]/index.tsx +++ b/packages/canyon-platform/src/pages/index/projects/[id]/index.tsx @@ -1,4 +1,4 @@ -import { BranchesOutlined, QuestionCircleOutlined } from '@ant-design/icons'; +import Icon, { BranchesOutlined, QuestionCircleOutlined } from '@ant-design/icons'; import { useQuery } from '@apollo/client'; import { Input, Spin, Table, theme, Tooltip, Tour, TourProps, Typography } from 'antd'; import { ColumnsType } from 'antd/es/table'; @@ -9,6 +9,7 @@ import { useTranslation } from 'react-i18next'; import { Link, useParams } from 'react-router-dom'; import ProjectRecordDetailDrawer from '../../../../components/app/ProjectRecordDetailDrawer.tsx'; +import MaterialSymbolsCommitSharp from '../../../../components/sha.tsx'; import { GetProjectByIdDocument, GetProjectChartDataDocument, @@ -97,7 +98,12 @@ const ProjectOverviewPage = () => { const columns: ColumnsType = [ { - title: 'Sha', + title: ( +
+ + Sha +
+ ), dataIndex: 'sha', width: '100px', render(_, { webUrl }): JSX.Element {