fix(../V2/SearchHistory): fixed hard coded color + lightmode thing

This commit is contained in:
danis
2024-01-04 19:31:36 +01:00
parent ef57eb752d
commit 851ee7420f
+10 -3
View File
@@ -1,9 +1,10 @@
import { View } from 'react-native'; import { View } from 'react-native';
import { Text } from 'native-base'; import { Text, theme } from 'native-base';
import { useQuery } from '../../Queries'; import { useQuery } from '../../Queries';
import API from '../../API'; import API from '../../API';
import { translate } from '../../i18n/i18n'; import { translate } from '../../i18n/i18n';
import { LoadingView } from '../Loading'; import { LoadingView } from '../Loading';
import useColorScheme from '../../hooks/colorScheme';
type historyRowProps = { type historyRowProps = {
type: string; type: string;
@@ -12,11 +13,14 @@ type historyRowProps = {
}; };
const HistoryRowComponent = (props: historyRowProps) => { const HistoryRowComponent = (props: historyRowProps) => {
const colorScheme = useColorScheme();
return ( return (
<View <View
style={{ style={{
borderTopWidth: 1, borderTopWidth: 1,
borderTopColor: '#9E9E9E', borderColor:
colorScheme == 'dark' ? theme.colors.coolGray[400] : theme.colors.coolGray[800],
paddingTop: 5, paddingTop: 5,
display: 'flex', display: 'flex',
flexDirection: 'row', flexDirection: 'row',
@@ -28,7 +32,10 @@ const HistoryRowComponent = (props: historyRowProps) => {
<View> <View>
<View <View
style={{ style={{
backgroundColor: 'gray', backgroundColor:
colorScheme == 'dark'
? theme.colors.coolGray[600]
: theme.colors.coolGray[400],
borderRadius: 8, borderRadius: 8,
paddingVertical: 4, paddingVertical: 4,
paddingHorizontal: 12, paddingHorizontal: 12,