Skip to content
This repository has been archived by the owner on Aug 15, 2022. It is now read-only.

feat: tapping the brand icon now takes you to the Home tab #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions src/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,28 @@ const WoodmenDarkIcon = withTheme(({ theme }) => ({
}))(Icon);

const WoodmenIcon = () => {
const navigation = useNavigation();
const theme = useTheme();
if (theme.type === 'light') {
return <WoodmenLightIcon />;
return (
<Touchable
onPress={() => {
navigation.navigate('Home');
}}
>
<WoodmenLightIcon />
</Touchable>
);
} else {
return <WoodmenDarkIcon />;
return (
<Touchable
onPress={() => {
navigation.navigate('Home');
}}
>
<WoodmenDarkIcon />
</Touchable>
);
}
};

Expand Down