@@ -3,9 +3,11 @@ import KeyboardAvoid from '@components/KeyboardAvoid'
33import RoundIcon , { type GradientName } from '@components/RoundIcon'
44import { PaddingTop } from '@components/SafePadding'
55import Search from '@components/Search'
6+ import SearchableBackHeader from '@components/SearchableBackHeader'
67import SettGroup from '@components/Settings/SettGroup'
78import { SettOption } from '@components/Settings/SettOption'
89import SettText from '@components/Settings/SettText'
10+ import SettWrapper from '@components/Settings/SettWrapper'
911import ArtificialIntelligence04Icon from '@hugeicons/ArtificialIntelligence04Icon'
1012import Calendar03Icon from '@hugeicons/Calendar03Icon'
1113import ColorsIcon from '@hugeicons/ColorsIcon'
@@ -105,53 +107,50 @@ export default function TyrItOut({ navigation }: NavProp) {
105107 const searchedTools = useMemo ( ( ) => searchTools ( search ) , [ search ] )
106108
107109 return (
108- < >
109- < PaddingTop />
110- < View className = 'px-5 pb-3' >
111- < View className = 'my-1 flex-row items-center justify-between' >
112- < Bold className = 'mb-1 mt-2 text-xl text-gray-800 dark:text-gray-200' > Try it out</ Bold >
113- < TouchableOpacity
114- activeOpacity = { 0.6 }
115- className = 'p-2.5 pb-3.5 pr-0.5 pt-2'
116- onPress = { ( ) => navigation . navigate ( 'Settings' ) }
117- >
118- < ListSettingIcon size = { 23 } color = { theme === 'dark' ? Colors . zinc [ '300' ] : Colors . zinc [ '700' ] } />
119- </ TouchableOpacity >
120- </ View >
121- < Search placeholder = 'Search tools' value = { search } onChangeText = { setSearch } />
122- </ View >
123- < KeyboardAvoid className = 'flex-1 bg-zinc-100 pt-4 dark:bg-black' contentContainerStyle = { { paddingBottom : 50 } } >
124- < Gap20 >
125- { searchedTools . map ( ( group , index ) => (
126- < Gap12 key = { index } >
127- { group . startText && < SettText > { group . startText } </ SettText > }
128- < SettGroup title = { group . title } >
129- { group . tools . map ( ( tool , i ) => (
130- < Animated . View
131- key = { i }
132- entering = { delayedFadeAnimationSearch ( search , i ) }
133- exiting = { exiting }
134- layout = { layout }
135- >
136- < SettOption
137- title = { tool . title }
138- Icon = { < RoundIcon Icon = { tool . Icon } gradient = { tool . gradient } className = { tool . className } /> }
139- arrow = { tool . arrow ?? true }
140- // Update onPress handlers to correctly navigate using the 'to' property
141- onPress = { ( ) => tool . to && navigation . navigate ( tool . to as any ) }
142- />
143- </ Animated . View >
144- ) ) }
145- </ SettGroup >
146- { group . endText && < SettText > { group . endText } </ SettText > }
147- </ Gap12 >
148- ) ) }
149- { searchedTools . length === 0 && (
150- < SettText className = 'text-center' > No tools found. Try searching for something else.</ SettText >
151- ) }
152- </ Gap20 >
153- </ KeyboardAvoid >
154- </ >
110+ < SettWrapper
111+ title = 'Try it out'
112+ Header = {
113+ < SearchableBackHeader
114+ title = 'Try it out'
115+ navigation = { navigation }
116+ onChangeText = { ( text ) => setSearch ( text ) }
117+ value = { search }
118+ placeholder = 'Search tools'
119+ />
120+ }
121+ >
122+ { /* <KeyboardAvoid className='flex-1 bg-zinc-100 dark:bg-black' contentContainerStyle={{ paddingBottom: 50 }}> */ }
123+ < Gap20 >
124+ { searchedTools . map ( ( group , index ) => (
125+ < Gap12 key = { index } >
126+ { group . startText && < SettText > { group . startText } </ SettText > }
127+ < SettGroup title = { group . title } >
128+ { group . tools . map ( ( tool , i ) => (
129+ < Animated . View
130+ key = { i }
131+ entering = { delayedFadeAnimationSearch ( search , i ) }
132+ exiting = { exiting }
133+ layout = { layout }
134+ >
135+ < SettOption
136+ title = { tool . title }
137+ Icon = { < RoundIcon Icon = { tool . Icon } gradient = { tool . gradient } className = { tool . className } /> }
138+ arrow = { tool . arrow ?? true }
139+ // Update onPress handlers to correctly navigate using the 'to' property
140+ onPress = { ( ) => tool . to && navigation . navigate ( tool . to as any ) }
141+ />
142+ </ Animated . View >
143+ ) ) }
144+ </ SettGroup >
145+ { group . endText && < SettText > { group . endText } </ SettText > }
146+ </ Gap12 >
147+ ) ) }
148+ { searchedTools . length === 0 && (
149+ < SettText className = 'text-center' > No tools found. Try searching for something else.</ SettText >
150+ ) }
151+ </ Gap20 >
152+ { /* </KeyboardAvoid> */ }
153+ </ SettWrapper >
155154 )
156155}
157156
0 commit comments