very basics of auth state - not actually authenticating anything right now....

This commit is contained in:
Will Baumbach
2025-08-05 12:04:02 -05:00
parent 813cb44637
commit 409f15f233
8 changed files with 224 additions and 23 deletions

View File

@@ -3,6 +3,9 @@ import { Tabs } from 'expo-router'
import React from 'react'
export default function TabLayout() {
const isAdmin = localStorage.getItem('session') === 'admin'
console.log(isAdmin)
return (
<Tabs
screenOptions={{
@@ -32,15 +35,16 @@ export default function TabLayout() {
options={{
title: 'Posts',
headerShown: false,
tabBarItemStyle: { display: isAdmin ? 'flex' : 'none' },
tabBarIcon: ({ color, focused }) => (
<Ionicons name={focused ? 'rocket-sharp' : 'rocket-outline'} size={24} color={color} />
)
}}
/>
<Tabs.Screen
name='login'
name='profile'
options={{
title: 'Login',
title: 'Profile',
headerShown: false,
tabBarIcon: ({ color, focused }) => (
<Ionicons