駅名検索確定時に現在地を更新#5277
Merged
TinyKitten merged 2 commits intodevfrom Feb 14, 2026
Merged
Conversation
Contributor
📝 WalkthroughウォークスルーNowHeader コンポーネントにロケーションアトムの統合を追加しました。駅が選択された際に、選択された駅の座標(緯度経度)とデフォルトロケーションオブジェクト(高度など)、現在のタイムスタンプを含むロケーションアトムを更新するロジックを実装しています。 変更内容
推定コードレビュー工数🎯 2 (Simple) | ⏱️ ~8 minutes 関連する可能性のある PR
ウサギからのポエム
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/components/NowHeader.tsx`:
- Around line 182-193: The code calls setLocationAtom with
station.latitude/station.longitude cast via "as number" which doesn't prevent
null/undefined; change the update in the NowHeader component to validate that
station.latitude and station.longitude are finite numbers before calling
setLocationAtom (or else call setLocationAtom with coords: null or simply skip
the update). Concretely, in the block that currently calls setLocationAtom,
check Number.isFinite(station.latitude) && Number.isFinite(station.longitude)
and only build the coords object with latitude/longitude when true; otherwise
either set coords to null or return without updating to avoid corrupting
locationAtom.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
新機能