chore: cleanup

This commit is contained in:
Adrian Castro
2024-04-02 01:17:43 +02:00
parent 91301991c4
commit 6a4a19a41c
3 changed files with 6 additions and 30 deletions

View File

@@ -1,9 +1,9 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'CheckIosCertificate' s.name = 'CheckIosCertificate'
s.version = '1.0.0' s.version = '1.0.0'
s.summary = 'A sample project summary' s.summary = 'Check if iOS certificate is Development or Production.'
s.description = 'A sample project description' s.description = 'Check if iOS certificate is Development or Production.'
s.author = '' s.author = 'castdrian'
s.homepage = 'https://docs.expo.dev/modules/' s.homepage = 'https://docs.expo.dev/modules/'
s.platforms = { :ios => '13.4', :tvos => '13.4' } s.platforms = { :ios => '13.4', :tvos => '13.4' }
s.source = { git: '' } s.source = { git: '' }

View File

@@ -127,7 +127,7 @@ export default function SearchScreen() {
<Animated.View <Animated.View
style={[ style={[
{ {
position: "absolute", position: "relative",
bottom: 0, bottom: 0,
left: 0, left: 0,
right: 0, right: 0,

View File

@@ -1,6 +1,5 @@
import type { Input } from "tamagui"; import type { Input } from "tamagui";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import { Keyboard } from "react-native";
import { FontAwesome5 } from "@expo/vector-icons"; import { FontAwesome5 } from "@expo/vector-icons";
import { useIsFocused } from "@react-navigation/native"; import { useIsFocused } from "@react-navigation/native";
import { useTheme, View } from "tamagui"; import { useTheme, View } from "tamagui";
@@ -15,7 +14,6 @@ export function SearchBar({
const theme = useTheme(); const theme = useTheme();
const pageIsFocused = useIsFocused(); const pageIsFocused = useIsFocused();
const [keyword, setKeyword] = useState(""); const [keyword, setKeyword] = useState("");
const [isFocused, setIsFocused] = useState(false);
const inputRef = useRef<Input>(null); const inputRef = useRef<Input>(null);
useEffect(() => { useEffect(() => {
@@ -24,26 +22,6 @@ export function SearchBar({
} }
}, [pageIsFocused]); }, [pageIsFocused]);
useEffect(() => {
const keyboardDidShowListener = Keyboard.addListener(
"keyboardDidShow",
() => {
setIsFocused(true);
},
);
const keyboardDidHideListener = Keyboard.addListener(
"keyboardDidHide",
() => {
setIsFocused(false);
},
);
return () => {
keyboardDidShowListener.remove();
keyboardDidHideListener.remove();
};
}, []);
const handleChange = (text: string) => { const handleChange = (text: string) => {
setKeyword(text); setKeyword(text);
onSearchChange(text); onSearchChange(text);
@@ -55,7 +33,7 @@ export function SearchBar({
alignItems="center" alignItems="center"
borderRadius={999} borderRadius={999}
borderWidth={1} borderWidth={1}
backgroundColor={isFocused ? theme.searchFocused : theme.searchBackground} backgroundColor={theme.searchBackground}
> >
<View width={48} alignItems="center" justifyContent="center"> <View width={48} alignItems="center" justifyContent="center">
<FontAwesome5 name="search" size={18} color={theme.searchIcon.val} /> <FontAwesome5 name="search" size={18} color={theme.searchIcon.val} />
@@ -67,9 +45,7 @@ export function SearchBar({
ref={inputRef} ref={inputRef}
placeholder="What are you looking for?" placeholder="What are you looking for?"
width="75%" width="75%"
backgroundColor={ backgroundColor={theme.searchBackground}
isFocused ? theme.searchFocused : theme.searchBackground
}
/> />
</View> </View>
); );