hide add server button when searching

This commit is contained in:
ppc
2024-08-16 12:30:26 +01:00
parent f637e46dcc
commit 875cbc4997
+2 -2
View File
@@ -89,8 +89,8 @@ export default function ServerManager({navigation}) {
if (!servers.length) {
return (
<View style={{gap: 10, flex: 1, justifyContent: "center", alignItems: "center"}}>
<EmptyStatePlaceholder message="No servers found" icon={<ServerOff color="gray"/>}/>
<Button mode="text" onPress={() => navigation.navigate('add-server')} icon={() => <Plus size={18} color={theme.colors.primary}/>}>Add Server</Button>
<EmptyStatePlaceholder message="No servers found" icon={<ServerOff color="gray"/>}/>
{(!searchQuery || !query.length) && (<Button mode="text" onPress={() => navigation.navigate('add-server')} icon={() => <Plus size={18} color={theme.colors.primary}/>}>Add Server</Button>)}
</View>
);
}