Skip to content

Commit

Permalink
feat: Add link into graph
Browse files Browse the repository at this point in the history
  • Loading branch information
firejune committed Nov 5, 2023
1 parent 7ada718 commit a5a3375
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/app/[username]/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ const Canvas = ({ data, username, count, scheme }: ChartProps) => {
const starts = [left * scale, top * scale]
const ends = [(left + boxSize) * scale, (top + boxSize) * scale]
return (
day.intensity && (
<area
key={y}
shape="rect"
coords={`${starts.join(',')}, ${ends.join(',')}`}
title={`${day.date}(${format(parseISO(day.date), 'EEE')}) / ${day.count || '0'}`}
/>
)
<area
key={y}
href={`https://github.com/${username}?from=${day.date}&to=${day.date}&tab=overview`}
target="github.com"
shape="rect"
coords={`${starts.join(',')}, ${ends.join(',')}`}
title={`${day.date}(${format(parseISO(day.date), 'EEE')}) / ${day.count || '0'}`}
/>
)
})}
</Fragment>
Expand Down

0 comments on commit a5a3375

Please sign in to comment.