:feat google search image
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
import { getPersonHistory, type PersonMini } from "@/apis/personHistoryApi";
|
||||
import { getShowById } from "@/apis/showApi";
|
||||
import styles from "@/app/stackStyles/participantStyles";
|
||||
import { useShowContext } from "@/contexts/ShowContext";
|
||||
import Ionicons from "@expo/vector-icons/Ionicons";
|
||||
import { router, useLocalSearchParams } from "expo-router";
|
||||
import * as WebBrowser from "expo-web-browser";
|
||||
import React from "react";
|
||||
import { Text, TouchableOpacity, View, Image, Dimensions } from "react-native";
|
||||
import {
|
||||
getPersonHistory,
|
||||
type PersonMini,
|
||||
type PersonHistoryRecord,
|
||||
} from "@/apis/personHistoryApi";
|
||||
import { getShowById } from "@/apis/showApi";
|
||||
import { Image, Text, TouchableOpacity, View } from "react-native";
|
||||
import {
|
||||
GestureHandlerRootView,
|
||||
ScrollView,
|
||||
@@ -40,8 +37,8 @@ export default function ParticipantScreen() {
|
||||
? Number(participantId[0])
|
||||
: Number(participantId);
|
||||
|
||||
const [loading, setLoading] = React.useState(false);
|
||||
const [error, setError] = React.useState<string | null>(null);
|
||||
const [, setLoading] = React.useState(false);
|
||||
const [, setError] = React.useState<string | null>(null);
|
||||
|
||||
const [appearances, setAppearances] = React.useState<AppearanceGroup[]>([]);
|
||||
|
||||
@@ -193,6 +190,18 @@ export default function ParticipantScreen() {
|
||||
</TouchableOpacity>
|
||||
|
||||
<View style={styles.performedShowsSection}>
|
||||
<TouchableOpacity
|
||||
style={styles.searchButton}
|
||||
onPress={() =>
|
||||
WebBrowser.openBrowserAsync(
|
||||
"https://www.google.com/search?udm=2&q=" +
|
||||
encodeURIComponent(String(name))
|
||||
)
|
||||
}
|
||||
>
|
||||
<Ionicons name="images-outline" size={24} color="white" />
|
||||
</TouchableOpacity>
|
||||
|
||||
<Text style={styles.performedShowsTitle}>Auftritte:</Text>
|
||||
|
||||
<ScrollView
|
||||
|
||||
@@ -171,6 +171,17 @@ const styles = StyleSheet.create({
|
||||
fontSize: 11,
|
||||
fontWeight: "600",
|
||||
},
|
||||
searchButton: {
|
||||
width: 50,
|
||||
height: 50,
|
||||
borderRadius: 20,
|
||||
backgroundColor: "hsl(221, 39%, 18%)",
|
||||
marginLeft: 15,
|
||||
marginTop: 15,
|
||||
marginBottom: 5,
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
},
|
||||
});
|
||||
|
||||
export default styles;
|
||||
|
||||
Reference in New Issue
Block a user