Files
jrshikoku/components/Menu/TopMenuButton.tsx
harukin-expo-dev-env b7a09eda6e feat: Expo SDK 53 → 54 upgrade (React Native 0.81.5)
- expo: ^53.0.0 → ^54.0.0 (54.0.33)
- react-native: 0.79.6 → 0.81.5
- react: 19.0.0 → 19.1.0
- babel-preset-expo: ~13.0.0 → ~54.0.10
- @expo/vector-icons: ^14.0.2 → ^15.0.3
- react-native-reanimated: ~3.17.4 → ~4.1.1
- react-native-worklets: 新規追加 (reanimated v4 必須 peer dep)
- expo-system-ui: 新規追加 (userInterfaceStyle 対応)

変更内容:
- app.json: newArchEnabled を expo-build-properties から expo root へ移動
- babel.config.js: React Compiler を明示的に無効化
- UpdateAsync.ts: expo-updates reloadAsync API 変更に対応
- TopMenuButton.tsx: @expo/vector-icons deep path import を named import に変更
- trainIconStatus.tsx: 未使用の Icon deep path import を削除
- package.json: @types/react ~19.0.10 → ~19.1.4、doctor exclude 追加
2026-03-18 01:51:44 +00:00

52 lines
1.3 KiB
TypeScript

import React from "react";
import { Linking, View } from "react-native";
import { UsefulBox } from "@/components/TrainMenu/UsefulBox";
import { MaterialCommunityIcons } from "@expo/vector-icons";
export const TopMenuButton = () => {
const buttonList:{
backgroundColor: string;
icon: keyof typeof MaterialCommunityIcons.glyphMap;
onPress: () => void;
title: string;
}[] = [
{
backgroundColor: "#F89038",
icon: "train-car",
onPress: () =>
Linking.openURL("https://www.jr-shikoku.co.jp/01_trainbus/sp/"),
title: "駅・鉄道情報",
},
{
backgroundColor: "#EA4752",
icon: "google-spreadsheet",
onPress: () =>
Linking.openURL(
"https://www.jr-shikoku.co.jp/01_trainbus/jikoku/sp/#mainprice-box"
),
title: "運賃表",
},
{
backgroundColor: "#91C31F",
icon: "clipboard-list-outline",
onPress: () => Linking.openURL("https://www.jr-shikoku.co.jp/e5489/"),
title: "予約",
},
];
return (
<View style={{ flexDirection: "row" }}>
{buttonList.map((d, index) => (
<UsefulBox
backgroundColor={d.backgroundColor}
icon={d.icon}
flex={1}
onPressButton={d.onPress}
key={index + d.icon}
>
{d.title}
</UsefulBox>
))}
</View>
);
};