fix(companion): add missing useEffect import and fix type errors#26960
Merged
dhairyashiil merged 2 commits intomainfrom Jan 17, 2026
Merged
fix(companion): add missing useEffect import and fix type errors#26960dhairyashiil merged 2 commits intomainfrom
dhairyashiil merged 2 commits intomainfrom
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
anikdhabal
approved these changes
Jan 17, 2026
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.
What does this PR do?
Fixes a critical bug causing iOS and Android companion apps to crash when opening the availability detail page.
In PR #26931, the code was refactored to use
useEffectinstead ofuseMemofor side effects (as recommended by Cubic AI review), but the import statement was never updated to includeuseEffect. This caused a runtime error (useEffect is not defined) when the component tried to render.Updates since last revision
Fixed TypeScript type errors in
edit-availability-hours.tsxandedit-availability-hours.ios.tsx:useScheduleByIdhook returnsSchedule | undefined, but the component prop expectedSchedule | nullschedule ?? null) to convertundefinedtonullMandatory Tasks (DO NOT REMOVE)
How should this be tested?
Previously, the app would crash immediately when trying to open the availability detail page.
Checklist
Human Review Checklist
useEffectis correctly added to the React import in both AvailabilityDetailScreen filesschedule ?? null) doesn't change runtime behavior (convertsundefinedtonullfor type safety)Link to Devin run: https://app.devin.ai/sessions/292e159b683c42649f7286a32539d188
Requested by: Dhairyashil Shinde (@dhairyashiil)