- update `app.json` with splash screen configuration - implement tab navigation redirection in `TabsLayout` for apps and profile tabs - update `HighlightText` prop usage from `style` to `highlightStyle` in `PostCard` and `PostContentRenderer` - fix chat message segment construction to avoid empty text segments when sending only images - refine UI styling by removing unnecessary shadows and adjusting `UserScreen` header visibility - improve `HomeScreen` scroll behavior by disabling animation on FlashList scroll-to-top
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
/**
|
||
* 用户主页 UserScreen
|
||
* 威友 - 查看其他用户资料
|
||
* 使用统一的 UserProfileScreen 组件,mode='other'
|
||
*/
|
||
|
||
import React from 'react';
|
||
import { useLocalSearchParams, useRouter } from 'expo-router';
|
||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||
import UserProfileScreen from './UserProfileScreen';
|
||
import { useCurrentUser } from '../../stores/auth';
|
||
import { SimpleHeader } from '../../components/common';
|
||
|
||
export const UserScreen: React.FC = () => {
|
||
const { userId: userIdParam } = useLocalSearchParams<{ userId?: string }>();
|
||
const router = useRouter();
|
||
const userId = userIdParam || '';
|
||
const currentUser = useCurrentUser();
|
||
const isSelfProfile = !!currentUser?.id && currentUser.id === userId;
|
||
|
||
return (
|
||
<SafeAreaView style={{ flex: 1 }} edges={['top', 'bottom']}>
|
||
<SimpleHeader title="用户主页" onBack={() => router.back()} />
|
||
<UserProfileScreen
|
||
mode={isSelfProfile ? 'self' : 'other'}
|
||
userId={isSelfProfile ? undefined : userId}
|
||
hasHeader
|
||
/>
|
||
</SafeAreaView>
|
||
);
|
||
};
|
||
|
||
export default UserScreen;
|