1- import React , { useState , useEffect } from 'react' ;
2- import logo from '../assets/INESCTEC_logotipo_color_rgb.png' ;
3- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' ;
4- import { faSearch , faArrowUp , faArrowDown , faTimes } from '@fortawesome/free-solid-svg-icons' ;
5- import { faStar as faStarRegular } from '@fortawesome/free-regular-svg-icons' ;
6- import { RepoIcon } from '@primer/octicons-react' ;
7- import { Link } from 'react-router-dom' ;
8- import { Tooltip } from 'react-tooltip' ;
1+ import React , { useState , useEffect } from "react" ;
2+ import logo from "../assets/INESCTEC_logotipo_color_rgb.png" ;
3+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
4+ import {
5+ faSearch ,
6+ faArrowUp ,
7+ faArrowDown ,
8+ faTimes ,
9+ } from "@fortawesome/free-solid-svg-icons" ;
10+ import { faStar as faStarRegular } from "@fortawesome/free-regular-svg-icons" ;
11+ import { RepoIcon } from "@primer/octicons-react" ;
12+ import { Link } from "react-router-dom" ;
13+ import { Tooltip } from "react-tooltip" ;
914
1015const Header = ( {
1116 searchTerm,
@@ -17,12 +22,14 @@ const Header = ({
1722 onRemoveTag,
1823 sortByStars,
1924 sortByRepos,
20- defaultCategory
25+ defaultCategory,
2126} ) => {
22- const [ activeCategory , setActiveCategory ] = useState ( defaultCategory || 'All' ) ;
27+ const [ activeCategory , setActiveCategory ] = useState (
28+ defaultCategory || "All" ,
29+ ) ;
2330 const [ isArrowUp , setIsArrowUp ] = useState ( true ) ;
2431 const [ calendarArrowUp , setCalendarArrowUp ] = useState ( true ) ;
25- const categories = [ ' All' , ' Energy' , ' Robotics' ] ;
32+ const categories = [ " All" , " Energy" , " Robotics" , "Artificial Intelligence" ] ;
2633
2734 const handleSearchInputChange = ( event ) => {
2835 onSearchChange ( event . target . value ) ;
@@ -39,7 +46,7 @@ const Header = ({
3946 } ;
4047
4148 useEffect ( ( ) => {
42- setActiveCategory ( defaultCategory || ' All' ) ;
49+ setActiveCategory ( defaultCategory || " All" ) ;
4350 } , [ defaultCategory ] ) ;
4451
4552 const handleCategoryChange = ( category ) => {
@@ -53,16 +60,18 @@ const Header = ({
5360 < Link to = "/" >
5461 < img src = { logo } alt = "INESC TEC" className = "h-12 md:h-16" />
5562 </ Link >
56- < span className = "reverse-gradient-text mt-4 mb-4 text-2xl md:text-4xl" > Open Source Software</ span >
63+ < span className = "reverse-gradient-text mt-4 mb-4 text-2xl md:text-4xl" >
64+ Open Source Software
65+ </ span >
5766 < div className = "flex space-x-4" >
5867 { categories . map ( ( category ) => (
5968 < button
6069 key = { category }
6170 onClick = { ( ) => handleCategoryChange ( category ) }
6271 className = { `px-4 py-1 text-xs font-semibold rounded-full transition-colors duration-300 ${
6372 activeCategory === category
64- ? ' bg-light-blue-2 text-white'
65- : ' text-dark-blue-2 bg-white border border-dark-blue-2'
73+ ? " bg-light-blue-2 text-white"
74+ : " text-dark-blue-2 bg-white border border-dark-blue-2"
6675 } `}
6776 >
6877 { category }
@@ -86,11 +95,14 @@ const Header = ({
8695 < div className = "hidden md:flex items-center ml-4" >
8796 < span className = "text-dark-blue-2" > Sort: </ span >
8897 < div id = "stars" data-tooltip-content = "Total Stars" >
89- < FontAwesomeIcon icon = { faStarRegular } className = "text-dark-blue-2 text-md ml-2" />
98+ < FontAwesomeIcon
99+ icon = { faStarRegular }
100+ className = "text-dark-blue-2 text-md ml-2"
101+ />
90102 < button
91103 onClick = { toggleArrow }
92104 className = { `focus:outline-none ${
93- sortByRepos ? ' opacity-50 cursor-not-allowed' : ''
105+ sortByRepos ? " opacity-50 cursor-not-allowed" : ""
94106 } `}
95107 disabled = { ! ! sortByRepos }
96108 >
@@ -105,7 +117,7 @@ const Header = ({
105117 < button
106118 onClick = { toggleCalendarArrow }
107119 className = { `focus:outline-none ${
108- sortByStars ? ' opacity-50 cursor-not-allowed' : ''
120+ sortByStars ? " opacity-50 cursor-not-allowed" : ""
109121 } `}
110122 disabled = { ! ! sortByStars }
111123 >
0 commit comments