Skip to content

Commit

Permalink
fix: change menu category onpress err - #41
Browse files Browse the repository at this point in the history
  • Loading branch information
byein committed Jan 2, 2023
1 parent cb3681d commit 2f9a2f0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions baedalmate/src/components/atoms/Main/CategoryItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Image,
TouchableOpacity,
ImageSourcePropType,
TouchableHighlight,
} from 'react-native';
import {LIGHT_GRAY_COLOR, PRIMARY_COLOR, WHITE_COLOR} from 'themes/theme';
import {TextKRReg} from 'themes/text';
Expand All @@ -32,7 +33,7 @@ const CategoryItem: React.FunctionComponent<CategoryItemProps> = ({
const [borderColor, setBorderColor] = useState(WHITE_COLOR);

const goToCategory = () => {
setActive(!active);
// setActive(!active);
navigation.navigate('카테고리', {
categoryId: category.categoryId,
});
Expand All @@ -44,10 +45,13 @@ const CategoryItem: React.FunctionComponent<CategoryItemProps> = ({

return (
<View style={{marginBottom: 15}}>
<TouchableOpacity
activeOpacity={1}
onPressIn={goToCategory}
onPressOut={goToCategory}
<TouchableHighlight
underlayColor={WHITE_COLOR}
// activeOpacity={1}
// onPressIn={onPress}
onPressIn={onPress}
onPressOut={onPress}
onPress={goToCategory}
style={{
borderWidth: 1,
borderRadius: 10,
Expand All @@ -60,7 +64,7 @@ const CategoryItem: React.FunctionComponent<CategoryItemProps> = ({
style={{width: 45, height: 45, borderRadius: 45 / 2}}></Image>
<TextKRReg style={{}}>{category.categoryName}</TextKRReg>
</View>
</TouchableOpacity>
</TouchableHighlight>
</View>
);
};
Expand Down

0 comments on commit 2f9a2f0

Please sign in to comment.