1
1
import { selectBricksIntegrator , setBricksIntegrator } from "@/src/reduxStore/states/general" ;
2
2
import { IntegratorPage , PageSearchProps } from "@/src/types/shared/bricks-integrator" ;
3
- import { IconAlertCircle , IconBrandGithub , IconChevronsDown , IconLoader , IconSearch } from "@tabler/icons-react" ;
3
+ import { IconAlertCircle , IconBrandGithub , IconChevronsDown , IconSearch } from "@tabler/icons-react" ;
4
4
import { useDispatch , useSelector } from "react-redux"
5
5
import LoadingIcon from "../loading/LoadingIcon" ;
6
6
import { useState } from "react" ;
7
7
import style from '@/src/styles/shared/bricks-integrator.module.css' ;
8
8
import { jsonCopy } from "@/submodules/javascript-functions/general" ;
9
- import * as TablerIcons from '@tabler/icons-react' ;
10
- import { getIconName } from "@/src/util/shared/bricks-integrator-helper" ;
11
-
12
9
export default function PageSearch ( props : PageSearchProps ) {
13
10
const dispatch = useDispatch ( ) ;
14
11
@@ -72,7 +69,6 @@ export default function PageSearch(props: PageSearchProps) {
72
69
{ config . search . results . map ( ( result : any , i : number ) => (
73
70
< li key = { result . id } onClick = { ( ) => props . selectSearchResult ( result . id ) }
74
71
className = { `text-left group flex flex-row items-center cursor-pointer select-none rounded-xl p-3 hover:bg-gray-100 relative ${ ! result . searchVisible || ! result . groupVisible ? 'hidden' : '' } ` } id = "option-1" role = "option" >
75
- < SVGIcon icon = { result . attributes . tablerIcon } size = { 24 } strokeWidth = { 2 } color = { "black" } />
76
72
< div className = "ml-2 flex-auto" >
77
73
< p className = "text-sm font-semibold text-gray-700" > { result . attributes . name } </ p >
78
74
< p className = "text-sm text-gray-500" > { result . attributes . description } </ p >
@@ -83,27 +79,3 @@ export default function PageSearch(props: PageSearchProps) {
83
79
</ div > }
84
80
</ > )
85
81
}
86
-
87
- function SVGIcon ( { icon, size, strokeWidth, color } ) {
88
- const Icon = TablerIcons [ 'Icon' + icon ] ;
89
- if ( Icon ) {
90
- return (
91
- < Icon
92
- size = { size }
93
- strokeWidth = { strokeWidth }
94
- color = { color }
95
- />
96
- )
97
- } else {
98
- const Icon = TablerIcons [ 'Icon' + getIconName ( icon ) ] ;
99
- if ( Icon ) {
100
- return (
101
- < Icon
102
- size = { size }
103
- strokeWidth = { strokeWidth }
104
- color = { color }
105
- />
106
- )
107
- }
108
- }
109
- }
0 commit comments