import { View, Text, TouchableOpacity, useWindowDimensions, Animated, Image as NativeImage, } from "react-native"; import React, { useState, useEffect, useCallback } from "react"; import { useTailwind } from "tailwind-rn"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import { TabView, SceneMap, TabBar } from "react-native-tab-view"; import AllSpaceMember from "./AllSpaceMember"; import IronfanSpaceMember from "./IronfanSpaceMember"; import SuperFanSpaceMember from "./SuperFanSpaceMember"; export default function SpaceMember({ navigation, route }) { const tailwind = useTailwind(); const insets = useSafeAreaInsets(); //tab组件相关 const layout = useWindowDimensions(); const [index, setIndex] = useState(0); const [routes] = useState([ { key: "all", title: "全部成员" }, { key: "ironFan", title: "空间铁粉" }, { key: "superFan", title: "空间超粉" }, ]); const renderScene = SceneMap({ all: () => , ironFan: () => , superFan: () => , }); const renderIndicator = useCallback((props) => { const { position, navigationState, getTabWidth } = props; const inputRange = [0, 1]; const translateX = position.interpolate({ inputRange: inputRange, outputRange: inputRange.map((x) => { return x * getTabWidth(navigationState.index); }), }); return ( ); }, []); const renderTabBar = useCallback( (props) => ( ), [] ); return ( ); }