@@ -4,6 +4,7 @@ import styles from '../styles/RepoPage.module.css'
44import { useEffect , useState , useMemo } from 'react'
55import Link from 'next/link'
66import { LineChart , Line , XAxis , YAxis , CartesianGrid , Tooltip , ResponsiveContainer } from 'recharts' ;
7+ import RepoHeader from '../components/RepoHeader'
78
89export async function getStaticPaths ( ) {
910 return {
@@ -77,7 +78,7 @@ export default function RepoStatPage ({ repoData, issues}) {
7778 < div className = { containerStyles . container } >
7879 < Head >
7980 < title > { displayedData ?. full_name } </ title >
80- < meta name = "Github Indicators Explorer" content = "Generated by create next app" />
81+ < meta name = "Github Indicators Explorer" content = { ` ${ displayedData ?. full_name } indicator` } />
8182 < link rel = "icon" href = "/favicon.ico" />
8283 </ Head >
8384
@@ -86,31 +87,29 @@ export default function RepoStatPage ({ repoData, issues}) {
8687 < p className = { styles . choose_repo } > Choose another repository</ p >
8788 </ Link >
8889
89- < div >
90- < div className = { styles . name_container } >
91- < img className = { styles . avatar } src = { displayedData ?. owner ?. avatar_url } />
92- < h2 className = { styles . repo_name } > { displayedData ?. full_name } </ h2 >
93- </ div >
94- < p className = { styles . description } > { displayedData ?. description } </ p >
90+ < RepoHeader data = { displayedData } />
91+
92+ < div className = { styles . option_container } >
93+ < p className = { styles . data_option } style = { { backgroundColor : "#C2DEFB" } } > Open issues</ p >
94+ < p className = { styles . data_option } style = { { backgroundColor : "#FFCCB6" } } > Collaborators</ p >
9595 </ div >
9696
9797 < div className = { styles . graph_container } >
9898 < ResponsiveContainer width = '100%' height = '100%' >
99- < LineChart
100- data = { issuesData }
101- margin = { {
102- top : 20 ,
103- right : 30 ,
104- left : - 10 ,
105- bottom : 5 ,
106- } }
107- >
108- < CartesianGrid strokeDasharray = "3 3" />
109- < XAxis dataKey = "date" tick = { false } tickLine = { false } />
110- < YAxis tick = { false } tickLine = { false } />
111- < Tooltip />
112- < Line type = "monotone" dataKey = "issues" stroke = "#C2DEFB" dot = { false } />
113- </ LineChart >
99+ < LineChart
100+ data = { issuesData }
101+ margin = { {
102+ top : 20 ,
103+ right : 30 ,
104+ left : - 10 ,
105+ bottom : 5 ,
106+ } }
107+ >
108+ < XAxis dataKey = "date" tick = { false } tickLine = { false } />
109+ < YAxis tick = { false } tickLine = { false } />
110+ < Tooltip />
111+ < Line type = "monotone" dataKey = "issues" stroke = "#C2DEFB" dot = { false } />
112+ </ LineChart >
114113 </ ResponsiveContainer >
115114 </ div >
116115 </ main >
0 commit comments