From 28c58ce83fc1b0c769b6fbdee56eb54c06dcc30d Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Thu, 2 Mar 2023 20:38:19 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E3=82=B3=E3=83=B3?= =?UTF-8?q?=E3=83=86=E3=83=B3=E3=83=84=E3=81=AE=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menu.js | 606 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 308 insertions(+), 298 deletions(-) diff --git a/menu.js b/menu.js index 8aa6e67..4d7d682 100644 --- a/menu.js +++ b/menu.js @@ -162,24 +162,11 @@ export default function Menu(props) { > - - - - Linking.openURL( - "https://www.jr-shikoku.co.jp/02_information/suspension/sp/" - ) - } - > - - 新型コロナウイルスに関するお知らせ - - - 列車の運行計画・混雑状況・感染症対策への取り組み - - + - - - } - flex={1} - onPressButton={() => - Linking.openURL("https://www.jr-eki.com/ticket/brand") - } - > - トクトク切符 - - } - flex={1} - onPressButton={() => - Linking.openURL( - "https://www.jr-shikoku.co.jp/01_trainbus/event_train/sp/" - ) - } - > - 観光列車 - - } - flex={1} - onPressButton={() => - Linking.openURL("https://www.jr-eki.com/tour/brand") - } - > - 旅行ツアー - - - - Linking.openURL("https://www.jr-eki.com/smart-eki/index.html") - } - > - - スマートえきちゃん - - - JR四国のチケットレススマホアプリです。 - - - - Linking.openURL( - "https://www.jr-shikoku.co.jp/sp/index.html#menu-box" - ) - } - > - - 臨時列車などのお知らせ - - - 区間縮小・計画運休・イベント・季節臨時列車など - - - - Linking.openURL("https://www.jr-shikoku.co.jp/03_news/press/") - } - > - - ニュースリリース - - - 公式プレス記事はこちら - - - - Linking.openURL("https://www.jr-shikoku.co.jp/teiki/") - } - > - - 定期運賃計算 - - - 通常/学生/快て〜き等はこちら - - - - Linking.openURL("https://www.jr-shikoku.co.jp/04_company/group/sp/") - } - > - - JR四国のお店・サービス - - - JR四国グループの施設をご案内 - - - - Linking.openURL("https://www.jr-odekake.net/smt/")} - > - - 時刻・運賃計算 - - - (マイ・ダイヤ) - - - - マイ・ダイヤはJR西日本提供のサービスです。 - - - Linking.openURL("tel:0570-00-4592")} - > - - JR四国案内センター - - - 0570-00-4592 - (8:00~20:00 年中無休) - (通話料がかかります) - - - - - - - JR四国公式Twitter一族 - - - - {((data) => - data.map((d) => ( - Linking.openURL(d.url)}> - {d.name} - - - - )))([ - { - url: "https://twitter.com/JRshikoku_eigyo", - name: "JR四国営業部【公式】", - }, - { - url: "https://twitter.com/JRshikoku_tokyo", - name: "JR四国 東京営業情報【公式】", - }, - { - url: "https://twitter.com/JRshikoku_osaka", - name: "JR四国 大阪営業部【公式】", - }, - { - url: "https://twitter.com/jr_shikoku_info", - name: "JR四国列車運行情報【公式】", - }, - { - url: "https://twitter.com/Smile_Eki_Chan", - name: "すまいるえきちゃん♡JR四国【公式】", - }, - { - url: "https://twitter.com/jrs_matsuyama", - name: "JR四国 松山駅 【公式】", - }, - { - url: "https://twitter.com/jrshikoku_kochi", - name: "JR四国 高知駅【公式】", - }, - { - url: "https://twitter.com/jr_tokust", - name: "JR四国 徳島駅【公式】", - }, - { - url: "https://twitter.com/jrshikoku_uwjm", - name: "JR四国 宇和島駅【公式】", - }, - { - url: "https://twitter.com/JRshikoku_wkoch", - name: "JR四国 ワープ高知支店【公式】", - }, - { - url: "https://twitter.com/jrshikoku_nihaw", - name: "JR四国 ワープ新居浜営業所【公式】", - }, - { - url: "https://twitter.com/Yoakemonogatari", - name: "志国土佐 時代の夜明けのものがたり【公式】", - }, - ])} - - - - このアプリについて - - - このアプリはXprocess(HARUKIN)が製作しているJR四国の完全非公式アシストアプリケーションです。このアプリに関することでのJR四国公式へ問合せすることはお控えください。以下のTwitterよりお願いします。 - - - Linking.openURL("https://twitter.com/Xprocess_main") - } - > - - XprocessのTwitter - - - 制作運営のTwitterです。 - - - navigate("setting")} - > - - アプリの設定 - - - アプリの設定画面を表示します。 - - - {/* - */} - + { ); }; + +const FixedContent = (props) => { + return ( + + + + Linking.openURL( + "https://www.jr-shikoku.co.jp/02_information/suspension/sp/" + ) + } + > + + 新型コロナウイルスに関するお知らせ + + + 列車の運行計画・混雑状況・感染症対策への取り組み + + + {props.children} + + + } + flex={1} + onPressButton={() => + Linking.openURL("https://www.jr-eki.com/ticket/brand") + } + > + トクトク切符 + + } + flex={1} + onPressButton={() => + Linking.openURL( + "https://www.jr-shikoku.co.jp/01_trainbus/event_train/sp/" + ) + } + > + 観光列車 + + } + flex={1} + onPressButton={() => + Linking.openURL("https://www.jr-eki.com/tour/brand") + } + > + 旅行ツアー + + + + Linking.openURL("https://www.jr-eki.com/smart-eki/index.html") + } + > + + スマートえきちゃん + + + JR四国のチケットレススマホアプリです。 + + + + Linking.openURL("https://www.jr-shikoku.co.jp/sp/index.html#menu-box") + } + > + + 臨時列車などのお知らせ + + + 区間縮小・計画運休・イベント・季節臨時列車など + + + + Linking.openURL("https://www.jr-shikoku.co.jp/03_news/press/") + } + > + + ニュースリリース + + + 公式プレス記事はこちら + + + + Linking.openURL("https://www.jr-shikoku.co.jp/teiki/") + } + > + + 定期運賃計算 + + + 通常/学生/快て〜き等はこちら + + + + Linking.openURL("https://www.jr-shikoku.co.jp/04_company/group/sp/") + } + > + + JR四国のお店・サービス + + + JR四国グループの施設をご案内 + + + + Linking.openURL("https://www.jr-odekake.net/smt/")} + > + + 時刻・運賃計算 + + + (マイ・ダイヤ) + + + + マイ・ダイヤはJR西日本提供のサービスです。 + + + Linking.openURL("tel:0570-00-4592")} + > + + JR四国案内センター + + + 0570-00-4592 + (8:00~20:00 年中無休) + (通話料がかかります) + + + + + + + JR四国公式Twitter一族 + + + + {((data) => + data.map((d) => ( + Linking.openURL(d.url)}> + {d.name} + + + + )))([ + { + url: "https://twitter.com/JRshikoku_eigyo", + name: "JR四国営業部【公式】", + }, + { + url: "https://twitter.com/JRshikoku_tokyo", + name: "JR四国 東京営業情報【公式】", + }, + { + url: "https://twitter.com/JRshikoku_osaka", + name: "JR四国 大阪営業部【公式】", + }, + { + url: "https://twitter.com/jr_shikoku_info", + name: "JR四国列車運行情報【公式】", + }, + { + url: "https://twitter.com/Smile_Eki_Chan", + name: "すまいるえきちゃん♡JR四国【公式】", + }, + { + url: "https://twitter.com/jrs_matsuyama", + name: "JR四国 松山駅 【公式】", + }, + { + url: "https://twitter.com/jrshikoku_kochi", + name: "JR四国 高知駅【公式】", + }, + { + url: "https://twitter.com/jr_tokust", + name: "JR四国 徳島駅【公式】", + }, + { + url: "https://twitter.com/jrshikoku_uwjm", + name: "JR四国 宇和島駅【公式】", + }, + { + url: "https://twitter.com/JRshikoku_wkoch", + name: "JR四国 ワープ高知支店【公式】", + }, + { + url: "https://twitter.com/jrshikoku_nihaw", + name: "JR四国 ワープ新居浜営業所【公式】", + }, + { + url: "https://twitter.com/Yoakemonogatari", + name: "志国土佐 時代の夜明けのものがたり【公式】", + }, + ])} + + + + このアプリについて + + + このアプリはXprocess(HARUKIN)が製作しているJR四国の完全非公式アシストアプリケーションです。このアプリに関することでのJR四国公式へ問合せすることはお控えください。以下のTwitterよりお願いします。 + + + Linking.openURL("https://twitter.com/Xprocess_main") + } + > + + XprocessのTwitter + + + 制作運営のTwitterです。 + + + props.navigate("setting")} + > + + アプリの設定 + + + アプリの設定画面を表示します。 + + + {/* + */} + + ); +}; From 3f8a753abbd5fdde1cc4988d1e763b4dd11d12e8 Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Thu, 2 Mar 2023 21:03:35 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=82=B9=E3=81=8C=E3=82=BA=E3=83=AC=E3=81=A6=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=8C=E5=B4=A9=E3=82=8C=E3=81=A6=E3=81=84=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menu.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/menu.js b/menu.js index 4d7d682..2b706c1 100644 --- a/menu.js +++ b/menu.js @@ -87,8 +87,13 @@ export default function Menu(props) { useEffect(() => { if (!(selectedCurrentStation < favoriteStation.length)) { - setSelectedCurrentStation(favoriteStation.length - 1); - carouselRef.current.snapToItem(favoriteStation.length - 1); + if (favoriteStation.length == 0) { + setSelectedCurrentStation(0); + carouselRef.current.snapToItem(0); + } else { + setSelectedCurrentStation(favoriteStation.length - 1); + carouselRef.current.snapToItem(favoriteStation.length - 1); + } } }, [favoriteStation]);