Statusphere running on a slice 馃崟
at main 32 lines 827 B view raw
1import { HomePage } from "./HomePage.tsx"; 2import { LoginPage } from "./LoginPage.tsx"; 3import { Layout } from "./Layout.tsx"; 4import { HydratedStatus } from "../types.ts"; 5 6interface AppProps { 7 currentUser: { 8 isAuthenticated: boolean; 9 handle?: string; 10 sub?: string; 11 }; 12 statuses?: HydratedStatus[]; 13 page?: string; 14 error?: string; 15 userTimezone?: string; 16} 17 18export function App({ currentUser, statuses = [], page, error, userTimezone }: AppProps) { 19 if (page === "login") { 20 return ( 21 <Layout title="Login - Statusphere" currentUser={currentUser}> 22 <LoginPage error={error} /> 23 </Layout> 24 ); 25 } 26 27 return ( 28 <Layout title="Statusphere" currentUser={currentUser}> 29 <HomePage currentUser={currentUser} statuses={statuses} userTimezone={userTimezone} /> 30 </Layout> 31 ); 32}