Skip to content

Commit

Permalink
Handle non correct birdseye settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Needham committed Sep 20, 2023
1 parent b241fbd commit 9fe97ca
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/screens/BirdseyeScreen/BirdseyeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,22 @@ export const BirdseyeScreen = () => {
return <BaseText>Loading ...</BaseText>;
}

if (config.data?.birdseye.enabled) {
return <WebRTCView cameraName="birdseye" />;
if (config.isError) {
return <BaseText>Failed to load frigate config</BaseText>;
}

return <BaseText>Birdseye is not enabled</BaseText>;
if (!config.data?.birdseye.enabled) {
return <BaseText>Birdseye is not enabled</BaseText>;
}

if (!config.data?.birdseye.restream) {
return (
<BaseText>
Restream must be enabled so that the birdseye feed is served through
WebRTC. Please update your Frigate config.
</BaseText>
);
}

return <WebRTCView cameraName="birdseye" />;
};

0 comments on commit 9fe97ca

Please sign in to comment.