openclaw/apps/expo-github-mobile/App.tsx
Claude 9ddebad13c feat: add Expo GitHub mobile app (React Native port)
Port of SwiftUI iOS app to Expo/React Native for cross-platform support.
- Session list with repository info and status
- Chat view with collapsible tool executions
- Message input with model/repo/branch selection chips
- PR creation flow simulation
- Dark theme matching Claude Code aesthetic
- KeyboardAvoidingView for proper keyboard handling

https://claude.ai/code/session_018qmTB96S8xvNRQFrhcvzJp
2026-01-23 13:42:49 -08:00

33 lines
980 B
TypeScript

import React, { useState } from 'react'
import { StatusBar } from 'expo-status-bar'
import { AppProvider } from './src/contexts/AppContext'
import { Session } from './src/models/types'
import SessionListView from './src/views/SessionListView'
import ChatView from './src/views/ChatView'
export default function App() {
const [currentView, setCurrentView] = useState<'list' | 'chat'>('list')
const [activeSession, setActiveSession] = useState<Session | null>(null)
const handleSessionPress = (session: Session) => {
setActiveSession(session)
setCurrentView('chat')
}
const handleBackToList = () => {
setCurrentView('list')
setActiveSession(null)
}
return (
<AppProvider>
<StatusBar style="light" />
{currentView === 'list' ? (
<SessionListView onSessionPress={handleSessionPress} />
) : activeSession ? (
<ChatView session={activeSession} onBack={handleBackToList} />
) : null}
</AppProvider>
)
}