Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select first online feed on layout load #675

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

skanderm
Copy link
Contributor

@skanderm skanderm temporarily deployed to orcasite-pr-675 October 10, 2024 23:00 Inactive
@@ -44,6 +44,7 @@ function MapLayout({ children }: { children: ReactNode }) {
const [currentFeed, setCurrentFeed] = useState(feed);
const [map, setMap] = useState<LeafletMap>();
const feeds = useFeedsQuery().data?.feeds ?? [];
const firstOnlineFeed = feeds.filter(({ online }) => online)[0];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fine for SSR since the query gets refetched by default (refetchOnMount is default true): https://tanstack.com/query/latest/docs/framework/react/reference/useQuery#usequery

@paulcretu paulcretu temporarily deployed to orcasite-pr-675 October 16, 2024 16:18 Inactive
@dthaler
Copy link
Contributor

dthaler commented Oct 16, 2024

@coderabbitai review

Copy link

coderabbitai bot commented Oct 16, 2024

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grayed out play button is confusing to users
3 participants