fix: 移除hello
This commit is contained in:
parent
d0ce370509
commit
81c1bf7c88
@ -1,4 +1,5 @@
|
|||||||
import { HapticTab } from '@/components/HapticTab';
|
import { HapticTab } from '@/components/HapticTab';
|
||||||
|
import AskNavbar from '@/components/layout/ask';
|
||||||
import { TabBarIcon } from '@/components/navigation/TabBarIcon';
|
import { TabBarIcon } from '@/components/navigation/TabBarIcon';
|
||||||
import { requestNotificationPermission } from '@/components/owner/utils';
|
import { requestNotificationPermission } from '@/components/owner/utils';
|
||||||
import TabBarBackground from '@/components/ui/TabBarBackground';
|
import TabBarBackground from '@/components/ui/TabBarBackground';
|
||||||
@ -7,13 +8,13 @@ import { useColorScheme } from '@/hooks/useColorScheme';
|
|||||||
import { prefetchChats } from '@/lib/prefetch';
|
import { prefetchChats } from '@/lib/prefetch';
|
||||||
import { fetchApi } from '@/lib/server-api-util';
|
import { fetchApi } from '@/lib/server-api-util';
|
||||||
import { getWebSocketManager, WebSocketStatus } from '@/lib/websocket-util';
|
import { getWebSocketManager, WebSocketStatus } from '@/lib/websocket-util';
|
||||||
|
import { TransitionPresets } from '@react-navigation/bottom-tabs';
|
||||||
import * as Notifications from 'expo-notifications';
|
import * as Notifications from 'expo-notifications';
|
||||||
import { Tabs } from 'expo-router';
|
import { Tabs } from 'expo-router';
|
||||||
import * as SecureStore from 'expo-secure-store';
|
import * as SecureStore from 'expo-secure-store';
|
||||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Platform } from 'react-native';
|
import { Platform } from 'react-native';
|
||||||
|
|
||||||
interface PollingData {
|
interface PollingData {
|
||||||
title: string;
|
title: string;
|
||||||
id: string;
|
id: string;
|
||||||
@ -258,35 +259,35 @@ export default function TabLayout() {
|
|||||||
{/* ask页面 */}
|
{/* ask页面 */}
|
||||||
<Tabs.Screen
|
<Tabs.Screen
|
||||||
name="ask"
|
name="ask"
|
||||||
// options={{
|
options={{
|
||||||
// title: 'ask',
|
title: 'ask',
|
||||||
// tabBarButton: () => null, // 隐藏底部标签栏
|
tabBarButton: () => null, // 隐藏底部标签栏
|
||||||
// headerShown: false, // 隐藏导航栏
|
headerShown: false, // 隐藏导航栏
|
||||||
// tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
||||||
// ...TransitionPresets.ShiftTransition,
|
...TransitionPresets.ShiftTransition,
|
||||||
// }}
|
}}
|
||||||
/>
|
/>
|
||||||
{/* memo list */}
|
{/* memo list */}
|
||||||
<Tabs.Screen
|
< Tabs.Screen
|
||||||
name="memo-list"
|
name="memo-list"
|
||||||
// options={{
|
options={{
|
||||||
// title: 'memo-list',
|
title: 'memo-list',
|
||||||
// tabBarButton: () => null, // 隐藏底部标签栏
|
tabBarButton: () => null, // 隐藏底部标签栏
|
||||||
// headerShown: false, // 隐藏导航栏
|
headerShown: false, // 隐藏导航栏
|
||||||
// tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
||||||
// ...TransitionPresets.ShiftTransition,
|
...TransitionPresets.ShiftTransition,
|
||||||
// }}
|
}}
|
||||||
/>
|
/>
|
||||||
{/* owner */}
|
{/* owner */}
|
||||||
<Tabs.Screen
|
< Tabs.Screen
|
||||||
name="owner"
|
name="owner"
|
||||||
// options={{
|
options={{
|
||||||
// title: 'owner',
|
title: 'owner',
|
||||||
// tabBarButton: () => null, // 隐藏底部标签栏
|
tabBarButton: () => null, // 隐藏底部标签栏
|
||||||
// headerShown: false, // 隐藏导航栏
|
headerShown: false, // 隐藏导航栏
|
||||||
// tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
|
||||||
// ...TransitionPresets.ShiftTransition,
|
...TransitionPresets.ShiftTransition,
|
||||||
// }}
|
}}
|
||||||
/>
|
/>
|
||||||
{/* 排行榜 */}
|
{/* 排行榜 */}
|
||||||
<Tabs.Screen
|
<Tabs.Screen
|
||||||
@ -366,7 +367,7 @@ export default function TabLayout() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Tabs >
|
</Tabs >
|
||||||
{/* <AskNavbar wsStatus={wsStatus} /> */}
|
<AskNavbar wsStatus={wsStatus} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import ReturnArrow from "@/assets/icons/svg/returnArrow.svg";
|
import ReturnArrow from "@/assets/icons/svg/returnArrow.svg";
|
||||||
import Chat from "@/components/ask/chat";
|
import Chat from "@/components/ask/chat";
|
||||||
import AskHello from "@/components/ask/hello";
|
|
||||||
import SendMessage from "@/components/ask/send";
|
import SendMessage from "@/components/ask/send";
|
||||||
import { ThemedText } from "@/components/ThemedText";
|
import { ThemedText } from "@/components/ThemedText";
|
||||||
import { useWebSocketStreamHandler } from "@/hooks/useWebSocketStreamHandler";
|
import { useWebSocketStreamHandler } from "@/hooks/useWebSocketStreamHandler";
|
||||||
@ -188,6 +187,7 @@ export default function AskScreen() {
|
|||||||
signal: abortControllerRef.current.signal
|
signal: abortControllerRef.current.signal
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (isMountedRef.current) {
|
if (isMountedRef.current) {
|
||||||
|
console.log("isMountedRef.current", isMountedRef.current)
|
||||||
setUserMessages(res);
|
setUserMessages(res);
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
@ -253,11 +253,11 @@ export default function AskScreen() {
|
|||||||
|
|
||||||
<View style={styles.contentContainer}>
|
<View style={styles.contentContainer}>
|
||||||
{/* 欢迎页面 */}
|
{/* 欢迎页面 */}
|
||||||
<Animated.View
|
{/* <Animated.View
|
||||||
style={[styles.absoluteView, welcomeStyle, { zIndex: 1 }]}
|
style={[styles.absoluteView, welcomeStyle, { zIndex: 1 }]}
|
||||||
>
|
>
|
||||||
<AskHello setUserMessages={setUserMessages} setConversationId={setConversationId} setIsHello={setIsHello} />
|
<AskHello setUserMessages={setUserMessages} setConversationId={setConversationId} setIsHello={setIsHello} />
|
||||||
</Animated.View>
|
</Animated.View> */}
|
||||||
|
|
||||||
{/* 聊天页面 */}
|
{/* 聊天页面 */}
|
||||||
<Animated.View
|
<Animated.View
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user