33 IconHome ,
44 IconBook ,
55 IconClockHour3 ,
6- IconSearch ,
76 IconHelpHexagon ,
87 IconBell ,
98} from '@tabler/icons-react' ;
@@ -17,7 +16,26 @@ const ICON_MAP = {
1716 Home : IconHome ,
1817 LibraryBooks : IconBook ,
1918 ClockHour3 : IconClockHour3 ,
20- Search : IconSearch ,
19+ Search : ( { size = 18 , className, ...props } ) => (
20+ < svg
21+ width = { size }
22+ height = { size }
23+ viewBox = "0 0 20 20"
24+ fill = "none"
25+ xmlns = "http://www.w3.org/2000/svg"
26+ className = { className }
27+ aria-hidden = "true"
28+ { ...props }
29+ >
30+ < path
31+ d = "M18.665 18.665L12.665 12.665M0.665039 7.66504C0.665039 8.58429 0.846099 9.49454 1.19788 10.3438C1.54967 11.1931 2.06528 11.9648 2.71529 12.6148C3.3653 13.2648 4.13698 13.7804 4.98626 14.1322C5.83553 14.484 6.74579 14.665 7.66504 14.665C8.58429 14.665 9.49454 14.484 10.3438 14.1322C11.1931 13.7804 11.9648 13.2648 12.6148 12.6148C13.2648 11.9648 13.7804 11.1931 14.1322 10.3438C14.484 9.49454 14.665 8.58429 14.665 7.66504C14.665 6.74579 14.484 5.83553 14.1322 4.98626C13.7804 4.13698 13.2648 3.3653 12.6148 2.71529C11.9648 2.06528 11.1931 1.54967 10.3438 1.19788C9.49454 0.846099 8.58429 0.665039 7.66504 0.665039C6.74579 0.665039 5.83553 0.846099 4.98626 1.19788C4.13698 1.54967 3.3653 2.06528 2.71529 2.71529C2.06528 3.3653 1.54967 4.13698 1.19788 4.98626C0.846099 5.83553 0.665039 6.74579 0.665039 7.66504Z"
32+ stroke = "currentColor"
33+ strokeWidth = "1.33"
34+ strokeLinecap = "round"
35+ strokeLinejoin = "round"
36+ />
37+ </ svg >
38+ ) ,
2139 HelpHexagon : IconHelpHexagon ,
2240} ;
2341
@@ -35,6 +53,7 @@ const getLearnerHeaderMenu = (
3553 exploreCoursesClick ,
3654) => {
3755 const BASE_URL = getConfig ( ) . LMS_BASE_URL ;
56+ const searchCatalogUrl = getConfig ( ) . SEARCH_CATALOG_URL ;
3857 const configNavLinks = getConfig ( ) . HEADER_NAV_LINKS ;
3958 const isLinkActive = ( link ) => {
4059 if ( link . url === '/dashboard' || link . url . endsWith ( '/dashboard' ) ) {
@@ -81,13 +100,13 @@ const getLearnerHeaderMenu = (
81100 : [ ] ) ,
82101 ] ;
83102
84- const searchItem = courseSearchUrl ? [ {
103+ const searchItem = searchCatalogUrl ? [ {
85104 type : 'item' ,
86105 href : null ,
87106 className : 'lw-search-item' ,
88107 content : (
89108 < div className = "lw-search-wrapper" >
90- < IconSearch size = { 16 } className = "lw-search-icon" />
109+ < ICON_MAP . Search size = { 18 } className = "lw-search-icon" />
91110 < input
92111 className = "lw-search-input"
93112 type = "search"
@@ -96,7 +115,7 @@ const getLearnerHeaderMenu = (
96115 onKeyDown = { ( e ) => {
97116 if ( e . key === 'Enter' ) {
98117 const q = e . target . value . trim ( ) ;
99- window . location . href = urls . baseAppUrl ( courseSearchUrl )
118+ window . location . href = urls . baseAppUrl ( searchCatalogUrl )
100119 + ( q ? `?q=${ encodeURIComponent ( q ) } ` : '' ) ;
101120 }
102121 } }
0 commit comments