Skip to content

Commit

Permalink
feat: add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Feb 20, 2024
1 parent 72975ad commit 6295ca4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/canyon-backend/src/adapter/gitlab.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions packages/canyon-platform/src/components/sha.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// import React from 'react';
import type { SVGProps } from 'react';

export default function MaterialSymbolsCommitSharp(props: SVGProps<SVGSVGElement>) {
return (<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" {...props}><path fill="currentColor" d="M12 17q-1.825 0-3.187-1.137T7.1 13H2v-2h5.1q.35-1.725 1.713-2.863T12 7q1.825 0 3.188 1.138T16.9 11H22v2h-5.1q-.35 1.725-1.712 2.863T12 17m0-2q1.25 0 2.125-.875T15 12q0-1.25-.875-2.125T12 9q-1.25 0-2.125.875T9 12q0 1.25.875 2.125T12 15"></path></svg>);
}
10 changes: 8 additions & 2 deletions packages/canyon-platform/src/pages/index/projects/[id]/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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,
Expand Down Expand Up @@ -97,7 +98,12 @@ const ProjectOverviewPage = () => {

const columns: ColumnsType<ProjectRecordsModel> = [
{
title: 'Sha',
title: (
<div>
<Icon component={MaterialSymbolsCommitSharp} className={'mr-2'} />
Sha
</div>
),
dataIndex: 'sha',
width: '100px',
render(_, { webUrl }): JSX.Element {
Expand Down

0 comments on commit 6295ca4

Please sign in to comment.