diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-07-20 19:39:51 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-07-20 19:39:51 -0500 |
commit | 139c9deb75d54d72cc819f5308001ec66d3962bc (patch) | |
tree | 2fadfe46f76f7e175d7d856ba37a06e50445cefc /src/view/routes/index.tsx | |
parent | 9e0ee99d6e6b9d03221684906db5531103f0d697 (diff) | |
download | voidsky-139c9deb75d54d72cc819f5308001ec66d3962bc.tar.zst |
Add icons to main tabs
Diffstat (limited to 'src/view/routes/index.tsx')
-rw-r--r-- | src/view/routes/index.tsx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/view/routes/index.tsx b/src/view/routes/index.tsx index 2d47a0470..112452196 100644 --- a/src/view/routes/index.tsx +++ b/src/view/routes/index.tsx @@ -9,6 +9,7 @@ import { import {createNativeStackNavigator} from '@react-navigation/native-stack' import {createBottomTabNavigator} from '@react-navigation/bottom-tabs' import {observer} from 'mobx-react-lite' +import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import type {RootTabsParamList} from './types' import {useStores} from '../../state' import * as platform from '../../platform/detection' @@ -54,8 +55,19 @@ const tabBarScreenOptions = ({ }) => ({ headerShown: false, tabBarIcon: (_state: {focused: boolean; color: string; size: number}) => { - // TODO: icons - return <Text>{route.name?.[0] || ''}</Text> + switch (route.name) { + case 'Home': + return <FontAwesomeIcon icon="house" /> + case 'Search': + return <FontAwesomeIcon icon="magnifying-glass" /> + case 'Notifications': + return <FontAwesomeIcon icon="bell" /> + case 'Menu': + return <FontAwesomeIcon icon="bars" /> + default: + return <FontAwesomeIcon icon="bars" /> + } + // return <Text>{route.name?.[0] || ''}</Text> }, }) |