feat: add useLinkBuilder hook to build links

We need to be able to create links from a navigate action to have accessible links in the built-in components such as drawer and tabs.
This commit is contained in:
Satyajit Sahoo
2020-04-15 00:22:25 +02:00
parent 2573b5beaa
commit 2792f438fe
15 changed files with 255 additions and 69 deletions

View File

@@ -1,4 +1,5 @@
import * as React from 'react';
import { Platform } from 'react-native';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import TouchableBounce from '../Shared/TouchableBounce';
@@ -28,7 +29,10 @@ export default function BottomTabsScreen() {
return (
<BottomTabs.Navigator
screenOptions={{
tabBarButton: (props) => <TouchableBounce {...props} />,
tabBarButton:
Platform.OS === 'web'
? undefined
: (props) => <TouchableBounce {...props} />,
}}
>
<BottomTabs.Screen