Skip to content

fix failing build on main #2853

Merged
ChristopherChudzicki merged 1 commit intomainfrom
cc/fix-server-import-issue
Jan 13, 2026
Merged

fix failing build on main #2853
ChristopherChudzicki merged 1 commit intomainfrom
cc/fix-server-import-issue

Conversation

@ChristopherChudzicki
Copy link
Contributor

What are the relevant tickets?

None

Description (What does it do?)

Fixes failing build on main.

How can this be tested?

Tests should pass.

@ChristopherChudzicki ChristopherChudzicki changed the title fix server import issue fix failing build on main Jan 13, 2026
import { Metadata } from "next"
import { HydrationBoundary, dehydrate } from "@tanstack/react-query"
import { articleQueries } from "api/hooks/articles"
import { articleQueries } from "api/hooks/articles/queries"
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 file is a React "server component", which is where server-side data fetching in NextJS happens. Because it's a server component, it has some restrictions about what hooks can be used or even imported.

The fix is to change the file to import articleQueries more directly; the articleQueries object itself never needs those hooks. Just some mutations (not used in this file, never used on the server) were getting incidentally imported.

@ChristopherChudzicki ChristopherChudzicki merged commit 0b1281c into main Jan 13, 2026
13 checks passed
@ChristopherChudzicki ChristopherChudzicki deleted the cc/fix-server-import-issue branch January 13, 2026 17:09
This was referenced Jan 13, 2026
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.

2 participants