Skip to content

Commit

Permalink
style(view): modify color function for more separate author
Browse files Browse the repository at this point in the history
  • Loading branch information
jejecrunch committed Sep 8, 2022
1 parent 97cf970 commit e7a3b9f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getInitData({ data }: GlobalProps) {

data.map((clusterNode) => {
const cluster: Cluster = {
clusterId: clusterNode.commitNodeList[0].taskId,
clusterId: clusterNode.commitNodeList[0].clusterId,
summary: {
authorNames: [],
keywords: [],
Expand Down Expand Up @@ -74,8 +74,7 @@ export function getColorValue(name: string) {
let result = "";

const index =
(name[0].charCodeAt(0) + name[1].charCodeAt(0) + name[2].charCodeAt(0)) %
colorName.length;
(name[0].charCodeAt(0) + name[1].charCodeAt(0)) % colorName.length;
result = `#${colorName[index]}`;
colorName.slice(0 + index, index + 1);

Expand Down

0 comments on commit e7a3b9f

Please sign in to comment.