diff --git a/mobile-app/package.json b/mobile-app/package.json index 2ff54bec5..3317af81c 100644 --- a/mobile-app/package.json +++ b/mobile-app/package.json @@ -4,7 +4,6 @@ "version": "0.6.6", "type": "module", "scripts": { - "ios:iphone16": "react-native run-ios --simulator=\"iPhone 16 (iOS 18.6)\"", "dev": "vite --port 1422", "build": "tsc -b && vite build", "lint": "eslint .", diff --git a/mobile-app/src/components/SplashScreen.tsx b/mobile-app/src/components/SplashScreen.tsx index 047f9245c..fedbafa94 100644 --- a/mobile-app/src/components/SplashScreen.tsx +++ b/mobile-app/src/components/SplashScreen.tsx @@ -2,16 +2,18 @@ import { useEffect, useState } from 'react' import { cn } from '@/lib/utils' interface SplashScreenProps { - onComplete: () => void + onComplete?: () => void } -export function SplashScreen({ onComplete }: SplashScreenProps) { +export function SplashScreen({ onComplete }: SplashScreenProps = {}) { const [isVisible, setIsVisible] = useState(true) useEffect(() => { const timer = setTimeout(() => { setIsVisible(false) - setTimeout(onComplete, 300) // Wait for fade out animation + if (onComplete) { + setTimeout(onComplete, 300) // Wait for fade out animation + } }, 2000) return () => clearTimeout(timer) diff --git a/mobile-app/src/routeTree.gen.ts b/mobile-app/src/routeTree.gen.ts index d2fcad568..20d12f74c 100644 --- a/mobile-app/src/routeTree.gen.ts +++ b/mobile-app/src/routeTree.gen.ts @@ -12,6 +12,8 @@ import { Route as rootRoute } from './routes/__root' import { Route as SettingsImport } from './routes/settings' +import { Route as OnboardingImport } from './routes/onboarding' +import { Route as ChatImport } from './routes/chat' import { Route as IndexImport } from './routes/index' // Create/Update Routes @@ -22,6 +24,18 @@ const SettingsRoute = SettingsImport.update({ getParentRoute: () => rootRoute, } as any) +const OnboardingRoute = OnboardingImport.update({ + id: '/onboarding', + path: '/onboarding', + getParentRoute: () => rootRoute, +} as any) + +const ChatRoute = ChatImport.update({ + id: '/chat', + path: '/chat', + getParentRoute: () => rootRoute, +} as any) + const IndexRoute = IndexImport.update({ id: '/', path: '/', @@ -39,6 +53,20 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof IndexImport parentRoute: typeof rootRoute } + '/chat': { + id: '/chat' + path: '/chat' + fullPath: '/chat' + preLoaderRoute: typeof ChatImport + parentRoute: typeof rootRoute + } + '/onboarding': { + id: '/onboarding' + path: '/onboarding' + fullPath: '/onboarding' + preLoaderRoute: typeof OnboardingImport + parentRoute: typeof rootRoute + } '/settings': { id: '/settings' path: '/settings' @@ -53,36 +81,46 @@ declare module '@tanstack/react-router' { export interface FileRoutesByFullPath { '/': typeof IndexRoute + '/chat': typeof ChatRoute + '/onboarding': typeof OnboardingRoute '/settings': typeof SettingsRoute } export interface FileRoutesByTo { '/': typeof IndexRoute + '/chat': typeof ChatRoute + '/onboarding': typeof OnboardingRoute '/settings': typeof SettingsRoute } export interface FileRoutesById { __root__: typeof rootRoute '/': typeof IndexRoute + '/chat': typeof ChatRoute + '/onboarding': typeof OnboardingRoute '/settings': typeof SettingsRoute } export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' | '/settings' + fullPaths: '/' | '/chat' | '/onboarding' | '/settings' fileRoutesByTo: FileRoutesByTo - to: '/' | '/settings' - id: '__root__' | '/' | '/settings' + to: '/' | '/chat' | '/onboarding' | '/settings' + id: '__root__' | '/' | '/chat' | '/onboarding' | '/settings' fileRoutesById: FileRoutesById } export interface RootRouteChildren { IndexRoute: typeof IndexRoute + ChatRoute: typeof ChatRoute + OnboardingRoute: typeof OnboardingRoute SettingsRoute: typeof SettingsRoute } const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, + ChatRoute: ChatRoute, + OnboardingRoute: OnboardingRoute, SettingsRoute: SettingsRoute, } @@ -97,12 +135,20 @@ export const routeTree = rootRoute "filePath": "__root.tsx", "children": [ "/", + "/chat", + "/onboarding", "/settings" ] }, "/": { "filePath": "index.tsx" }, + "/chat": { + "filePath": "chat.tsx" + }, + "/onboarding": { + "filePath": "onboarding.tsx" + }, "/settings": { "filePath": "settings.tsx" } diff --git a/mobile-app/src/routes/__root.tsx b/mobile-app/src/routes/__root.tsx index b8b33b6c3..a0758d66e 100644 --- a/mobile-app/src/routes/__root.tsx +++ b/mobile-app/src/routes/__root.tsx @@ -1,15 +1,55 @@ import { createRootRoute, Outlet } from '@tanstack/react-router' import { TanStackRouterDevtools } from '@tanstack/router-devtools' import { Toaster } from 'sonner' +import { useState, useEffect } from 'react' export const Route = createRootRoute({ - component: () => ( -
Loading Jan Mobile...
+Setting up...
+Redirecting to onboarding...
+