import { TouchableOpacity } from "react-native-gesture-handler";
import { Feather } from '@expo/vector-icons';
import { router, useLocalSearchParams } from "expo-router";

export const ShareButton = () => {
    const { id } = useLocalSearchParams<{ id: string }>();
    if (!id) {
        return null;
    }
    return (
        <TouchableOpacity onPress={() => router.push(`/travel_history/download/${id}`)}>
            <Feather name="share-2" size={24} color="white" />
        </TouchableOpacity>
    );
};