27 lines
773 B
JavaScript
27 lines
773 B
JavaScript
import { View, TouchableOpacity, Linking,Platform, Image, useWindowDimensions } from "react-native";
|
|
import Constants from "expo-constants";
|
|
|
|
|
|
export const TitleBar = () => {
|
|
const { width } = useWindowDimensions();
|
|
return (
|
|
<View
|
|
style={{
|
|
alignItems: "center",
|
|
position: "absolute",
|
|
top: 0,
|
|
left: 0,
|
|
right: 0,
|
|
zIndex: 100,
|
|
paddingTop: Platform.OS == "ios" ? Constants.statusBarHeight : 0,
|
|
}}
|
|
>
|
|
<TouchableOpacity
|
|
onPress={() => Linking.openURL("https://www.jr-shikoku.co.jp")}
|
|
>
|
|
<Image source={require("../../assets/Header.png")} style={{ width: width, resizeMode: "contain", backgroundColor: "white", height: 80 }} />
|
|
</TouchableOpacity>
|
|
</View>
|
|
);
|
|
};
|