1- import { faCalendar , faFileCode , faLink , faTag } from '@fortawesome/free-solid-svg-icons'
1+ import { faCalendar , faFileCode , faTag } from '@fortawesome/free-solid-svg-icons'
22import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
33import { DetailsCardProps } from 'types/card'
44import { formatDate } from 'utils/dateFormatter'
55import { getSocialIcon } from 'utils/urlIconMappings'
6+ import AnchorTitle from 'components/AnchorTitle'
67import ChapterMap from 'components/ChapterMap'
78import InfoBlock from 'components/InfoBlock'
89import ItemCardList from 'components/ItemCardList'
910import RepositoriesCard from 'components/RepositoriesCard'
1011import SecondaryCard from 'components/SecondaryCard'
11- import TitleWithIcon from 'components/TitleWithIcon'
1212import ToggleableList from 'components/ToggleableList'
1313import TopContributors from 'components/ToggleContributors'
1414
@@ -39,16 +39,15 @@ const DetailsCard = ({
3939 { ! is_active && (
4040 < span className = "ml-2 rounded bg-red-200 px-2 py-1 text-sm text-red-800" > Inactive</ span >
4141 ) }
42- < SecondaryCard title = { < TitleWithIcon href = "#summary" icon = { faLink } title = "Summary" /> } >
42+ < SecondaryCard title = { < AnchorTitle href = "#summary" title = "Summary" /> } >
4343 < p > { summary } </ p >
4444 </ SecondaryCard >
4545
4646 < div className = "grid grid-cols-1 gap-6 md:grid-cols-7" >
4747 < SecondaryCard
4848 title = {
49- < TitleWithIcon
49+ < AnchorTitle
5050 href = { `#${ type } -details` }
51- icon = { faLink }
5251 title = { `${ type [ 0 ] . toUpperCase ( ) + type . slice ( 1 ) } Details` }
5352 />
5453 }
@@ -66,7 +65,7 @@ const DetailsCard = ({
6665 </ SecondaryCard >
6766 { ( type === 'project' || type === 'repository' || type === 'committee' ) && (
6867 < SecondaryCard
69- title = { < TitleWithIcon href = "#statistics" icon = { faLink } title = "Statistics" /> }
68+ title = { < AnchorTitle href = "#statistics" title = "Statistics" /> }
7069 className = "md:col-span-2"
7170 >
7271 { stats . map ( ( stat , index ) => (
@@ -97,13 +96,13 @@ const DetailsCard = ({
9796 { languages . length !== 0 && (
9897 < ToggleableList
9998 items = { languages }
100- label = { < TitleWithIcon href = "#languages" icon = { faLink } title = "Languages" /> }
99+ label = { < AnchorTitle href = "#languages" title = "Languages" /> }
101100 />
102101 ) }
103102 { topics . length !== 0 && (
104103 < ToggleableList
105104 items = { topics }
106- label = { < TitleWithIcon href = "#topics" icon = { faLink } title = "Topics" /> }
105+ label = { < AnchorTitle href = "#topics" title = "Topics" /> }
107106 />
108107 ) }
109108 </ div >
@@ -114,7 +113,7 @@ const DetailsCard = ({
114113 { ( type === 'project' || type === 'repository' ) && (
115114 < >
116115 < ItemCardList
117- title = { < TitleWithIcon href = "#recent-issues" icon = { faLink } title = "Recent Issues" /> }
116+ title = { < AnchorTitle href = "#recent-issues" title = "Recent Issues" /> }
118117 data = { recentIssues }
119118 renderDetails = { ( item ) => (
120119 < div className = "mt-2 flex items-center text-sm text-gray-600 dark:text-gray-400" >
@@ -126,9 +125,7 @@ const DetailsCard = ({
126125 ) }
127126 />
128127 < ItemCardList
129- title = {
130- < TitleWithIcon href = "#recent-releases" icon = { faLink } title = "Recent Releases" />
131- }
128+ title = { < AnchorTitle href = "#recent-releases" title = "Recent Releases" /> }
132129 data = { recentReleases }
133130 renderDetails = { ( item ) => (
134131 < div className = "mt-2 flex items-center text-sm text-gray-600 dark:text-gray-400" >
@@ -143,7 +140,7 @@ const DetailsCard = ({
143140 ) }
144141 { type === 'project' && repositories . length > 0 && (
145142 < SecondaryCard
146- title = { < TitleWithIcon href = "#repositories" icon = { faLink } title = "Repositories" /> }
143+ title = { < AnchorTitle href = "#repositories" title = "Repositories" /> }
147144 className = "mt-6"
148145 >
149146 < RepositoriesCard repositories = { repositories } />
0 commit comments