diff --git a/app/_layout.tsx b/app/_layout.tsx
index cbdfbdf..41f32ad 100644
--- a/app/_layout.tsx
+++ b/app/_layout.tsx
@@ -1,16 +1,11 @@
-import * as React from 'react';
-import { NavigationContainer } from '@react-navigation/native';
-import SettingsComponent from '@/components/Settings';
-import { LanguageSelection } from '@/components/LanguageSelection';
-import { createNativeStackNavigator } from '@react-navigation/native-stack';
-import ConversationThread from '@/components/ConversationThread';
-import Home from '.';
-import TTNavStack from '@/components/TTNavStack';
-
-const Stack = createNativeStackNavigator();
+import * as React from "react";
+import { NavigationContainer } from "@react-navigation/native";
+import TTNavStack from "@/components/TTNavStack";
export default function Layout() {
return (
-
+
+
+
);
-}
\ No newline at end of file
+}
diff --git a/components/TTNavStack.tsx b/components/TTNavStack.tsx
index c8ccce4..59eb538 100644
--- a/components/TTNavStack.tsx
+++ b/components/TTNavStack.tsx
@@ -17,9 +17,9 @@ const Stack = createNativeStackNavigator();
export default function TTNavStack() {
+ const nav = useNavigation>();
async function onLangSelected(lang: language_matrix_entry) {
- const nav = useNavigation>();
const settings = await Settings.getDefault();
const hostLanguage = await settings.getHostLanguage();
const conversation = new Conversation(
@@ -31,7 +31,6 @@ export default function TTNavStack() {
}
return (
-
{ props => onLangSelected(l)} />}
@@ -39,6 +38,5 @@ export default function TTNavStack() {
-
);
}
\ No newline at end of file
diff --git a/navigation.types.ts b/navigation.types.ts
index 05bc7c2..0e6d7e0 100644
--- a/navigation.types.ts
+++ b/navigation.types.ts
@@ -7,5 +7,5 @@ export type RootStackParamList = {
LanguageSelection: undefined;
ConversationThread: undefined;
Settings: undefined;
- Conversation: { conversation: Conversation };
+ Conversation: { conversation?: Conversation };
};
\ No newline at end of file